diff options
Diffstat (limited to 'test/ruby/test_signal.rb')
-rw-r--r-- | test/ruby/test_signal.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb index 5d6ca12581..ee63f8d8e0 100644 --- a/test/ruby/test_signal.rb +++ b/test/ruby/test_signal.rb @@ -173,9 +173,10 @@ class TestSignal < Test::Unit::TestCase end if Process.respond_to?(:kill) def test_kill_immediately_before_termination - assert_in_out_err(["-e", <<-'end;'], "", %w"foo") - Signal.trap(:USR1) { STDOUT.syswrite("foo") } - Process.kill :USR1, $$ + Signal.list[sig = "USR1"] or sig = "INT" + assert_in_out_err(["-e", <<-"end;"], "", %w"foo") + Signal.trap(:#{sig}) { STDOUT.syswrite("foo") } + Process.kill :#{sig}, $$ end; end if Process.respond_to?(:kill) |