summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_objectspace.rb2
-rw-r--r--bootstraptest/test_thread.rb18
2 files changed, 10 insertions, 10 deletions
diff --git a/bootstraptest/test_objectspace.rb b/bootstraptest/test_objectspace.rb
index 862a94e376..24a1a0ce2c 100644
--- a/bootstraptest/test_objectspace.rb
+++ b/bootstraptest/test_objectspace.rb
@@ -35,7 +35,7 @@ assert_normal_exit %q{
assert_normal_exit %q{
ObjectSpace.define_finalizer("") do
- Mutex.new.lock
+ Thread::Mutex.new.lock
end
}, '[ruby-dev:44049]'
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index 747b6b88f7..d16295de8b 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -347,7 +347,7 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
begin
- m1, m2 = Mutex.new, Mutex.new
+ m1, m2 = Thread::Mutex.new, Thread::Mutex.new
f1 = f2 = false
Thread.new { m1.lock; f2 = true; sleep 0.001 until f1; m2.lock }
m2.lock; f1 = true; sleep 0.001 until f2; m1.lock
@@ -358,32 +358,32 @@ assert_equal 'ok', %q{
}
assert_equal 'ok', %q{
- m = Mutex.new
+ m = Thread::Mutex.new
Thread.new { m.lock }; sleep 0.1; m.lock
:ok
}
assert_equal 'ok', %q{
- m = Mutex.new
+ m = Thread::Mutex.new
Thread.new { m.lock }; m.lock
:ok
}
assert_equal 'ok', %q{
- m = Mutex.new
+ m = Thread::Mutex.new
Thread.new { m.lock }.join; m.lock
:ok
}
assert_equal 'ok', %q{
- m = Mutex.new
+ m = Thread::Mutex.new
Thread.new { m.lock; sleep 0.2 }
sleep 0.1; m.lock
:ok
}
assert_equal 'ok', %q{
- m = Mutex.new
+ m = Thread::Mutex.new
Thread.new { m.lock; sleep 0.2; m.unlock }
sleep 0.1; m.lock
:ok
@@ -409,7 +409,7 @@ assert_equal 'ok', %{
open("zzz.rb", "w") do |f|
f.puts <<-'end;' # do
begin
- m = Mutex.new
+ m = Thread::Mutex.new
parent = Thread.current
th1 = Thread.new { m.lock; sleep }
sleep 0.01 until th1.stop?
@@ -437,8 +437,8 @@ assert_equal 'ok', %{
assert_finish 3, %q{
require 'thread'
- lock = Mutex.new
- cond = ConditionVariable.new
+ lock = Thread::Mutex.new
+ cond = Thread::ConditionVariable.new
t = Thread.new do
lock.synchronize do
cond.wait(lock)