summaryrefslogtreecommitdiff
path: root/test/ruby/test_signal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_signal.rb')
-rw-r--r--test/ruby/test_signal.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb
index ba0ee6d9e47..c7bcc4a375a 100644
--- a/test/ruby/test_signal.rb
+++ b/test/ruby/test_signal.rb
@@ -16,12 +16,10 @@ class TestSignal < Test::Unit::TestCase
assert_equal 2, x
Signal.trap(:INT) { raise "Interrupt" }
- ex = assert_raise(RuntimeError) {
+ assert_raise_with_message(RuntimeError, /Interrupt/) {
Process.kill :INT, Process.pid
sleep 0.1
}
- assert_kind_of Exception, ex
- assert_match(/Interrupt/, ex.message)
ensure
Signal.trap :INT, oldtrap if oldtrap
end