diff options
Diffstat (limited to 'test')
-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 d5386c0cbe..8a3286871c 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -158,8 +158,9 @@ class TestThread < Test::Unit::TestCase assert_raise(Timeout::Error) do Timeout.timeout(0.1) { condvar.wait mutex } end - mutex.unlock rescue - threads[i].each.join + mutex.unlock + threads.each(&:kill) + threads.each(&:join) end def test_condvar_timed_wait |