summaryrefslogtreecommitdiff
path: root/test/ruby/test_thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r--test/ruby/test_thread.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 145e021790..518ad40333 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -863,4 +863,19 @@ class TestThreadGroup < Test::Unit::TestCase
end
assert_in_delta(t1 - t0, 1, 1, bug5757)
end
+
+ def test_thread_join_in_trap
+ assert_raise(ThreadError) {
+ t = Thread.new{ sleep 0.2; Process.kill(:INT, $$) }
+
+ Signal.trap :INT do
+ t.join
+ end
+
+ t.join
+ }
+ end
+
+
+
end