aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-31 00:48:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-31 00:48:56 +0000
commitd481e34e3c1a69b4c2142d2e7ac64ff2f962efe4 (patch)
tree87977c6a12c0bd3ac2b486290428be7a922a3c87
parent197627354e3c065542d92f5541425df699f4b204 (diff)
downloadruby-d481e34e3c1a69b4c2142d2e7ac64ff2f962efe4.tar.gz
misplaced rescue
* test/ruby/test_thread.rb (test_condvar_wait_deadlock_2): fix cleanup code which is never executed because of misplaced rescue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_thread.rb5
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