diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-30 06:22:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-30 06:22:30 +0000 |
commit | 4b298ad77a8388f0aae62daeca66659a8effeade (patch) | |
tree | 163674f4123bf461a86b4f6fd1de964297057bae /bootstraptest | |
parent | 0df79477bd2cd534ad2d89bfdbf9708c64b59eed (diff) | |
download | ruby-4b298ad77a8388f0aae62daeca66659a8effeade.tar.gz |
Use qualified names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_objectspace.rb | 2 | ||||
-rw-r--r-- | bootstraptest/test_thread.rb | 18 |
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) |