diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-28 04:09:38 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-28 04:09:38 +0000 |
commit | 694c77633c80a106a1e526870ad5076bfac30640 (patch) | |
tree | e7b83a4ee3845c914b205e65e6165fac5d849f97 /test/ruby/test_thread.rb | |
parent | 4ed6a88b74be65894b580dba81e7b8e3e8b0c3ce (diff) | |
download | ruby-694c77633c80a106a1e526870ad5076bfac30640.tar.gz |
* thread.c (thread_join): A trap handler check was moved from
thread_join_m because Thread#value should be raised an exception
too.
* thread.c (thread_join_m): remove trap handler check.
* test/ruby/test_thread.rb (test_thread_join_in_trap): add test
for thread#value.
* NEWS: documentation fix for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 13d1a3ff65..30e886447e 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -874,6 +874,17 @@ class TestThreadGroup < Test::Unit::TestCase t.join } + + assert_raise(ThreadError) { + t = Thread.new{ sleep 0.2; Process.kill(:INT, $$) } + + Signal.trap :INT do + t.value + end + + t.value + } + end def test_thread_join_current |