diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-02 00:31:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-02 00:31:31 +0000 |
commit | 544899362ff38af7c1193318c1e3892e1660b3b7 (patch) | |
tree | b3df193ebe01edce743ba647d55760b703e2d278 /test | |
parent | 029d8076bc824c55f649b1552b062170ec4abe12 (diff) | |
download | ruby-544899362ff38af7c1193318c1e3892e1660b3b7.tar.gz |
test_thread.rb: thread leak
* test/ruby/test_thread.rb (test_handle_interrupt_blocking): fix
thread leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_thread.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index fe8e2384a0..c1606f2ff2 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -645,11 +645,9 @@ class TestThread < Test::Unit::TestCase end } } - sleep 1 - r=:ng - th.raise RuntimeError - th.join - rescue e + assert_raise(e) {sleep 1} + ensure + assert_raise(RuntimeError) {th.join(0)} end assert_equal(:ok,r) end |