aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_thread.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 45f389b0fa..dfad5f6b34 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -857,7 +857,7 @@ class TestThreadGroup < Test::Unit::TestCase
end
def test_thread_join_in_trap
- assert_raise(ThreadError) {
+ assert_nothing_raised{
t = Thread.new{ sleep 0.2; Process.kill(:INT, $$) }
Signal.trap :INT do
@@ -867,16 +867,16 @@ 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
- }
-
+ assert_equal(:normal_end,
+ begin
+ t = Thread.new{ sleep 0.2; Process.kill(:INT, $$); :normal_end }
+
+ Signal.trap :INT do
+ t.value
+ end
+ t.value
+ end
+ )
end
def test_thread_join_current