From 694c77633c80a106a1e526870ad5076bfac30640 Mon Sep 17 00:00:00 2001 From: kosaki Date: Wed, 28 Nov 2012 04:09:38 +0000 Subject: * 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 --- test/ruby/test_thread.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') 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 -- cgit v1.2.3