summaryrefslogtreecommitdiff
path: root/test/monitor
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-06 12:31:52 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-06 12:31:52 +0000
commit332e8fe51f0ba4107c6fef4957ddeb15a0681dec (patch)
tree401f2459a30389a8f97c2aa6ca4d1c0e78228bbf /test/monitor
parentcef8a996bebd0a6102f92fc6c4976f282e1f64fa (diff)
* lib/monitor.rb (wait): supported timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/monitor')
-rw-r--r--test/monitor/test_monitor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/monitor/test_monitor.rb b/test/monitor/test_monitor.rb
index 973b3c2..8591570 100644
--- a/test/monitor/test_monitor.rb
+++ b/test/monitor/test_monitor.rb
@@ -122,7 +122,7 @@ class TestMonitor < Test::Unit::TestCase
end
end
- def _test_timedwait
+ def test_timedwait
cond = @monitor.new_cond
b = "foo"
queue2 = Queue.new
@@ -153,7 +153,7 @@ class TestMonitor < Test::Unit::TestCase
@monitor.synchronize do
assert_equal("foo", c)
result3 = cond.wait(0.1)
- assert_equal(false, result3)
+ assert_equal(true, result3) # wait always returns true in Ruby 1.9
assert_equal("foo", c)
queue3.enq(nil)
result4 = cond.wait