diff options
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index e60da4f120..ddbbaf2c63 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -637,15 +637,16 @@ class TestThread < Test::Unit::TestCase th = Thread.start{ Thread.handle_interrupt(Object => :on_blocking){ begin - sleep 0.0001 until r == :ok + sleep 0.0001 until r == :wait Thread.current.raise RuntimeError + r = :ok sleep ensure th_s.raise e, "raise from ensure", $@ end } } - assert_raise(e) {r = :ok; sleep 1} + assert_raise(e) {r = :wait; sleep 1} ensure assert_raise(RuntimeError) {th.join(0)} end |