summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_comparable.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_comparable.rb b/test/ruby/test_comparable.rb
index 6c58e5d365..e734e8b979 100644
--- a/test/ruby/test_comparable.rb
+++ b/test/ruby/test_comparable.rb
@@ -17,9 +17,11 @@ class TestComparable < Test::Unit::TestCase
assert_equal(true, @o == nil)
cmp->(x) do 1; end
assert_equal(false, @o == nil)
+ cmp->(x) do raise NotImplementedError, "Not a RuntimeError" end
+ assert_raise(NotImplementedError) { @o == nil }
bug7688 = '[ruby-core:51389] [Bug #7688]'
- cmp->(x) do raise NotImplementedError; end
- assert_raise(NotImplementedError, bug7688) { @o == nil }
+ cmp->(x) do raise StandardError, "Even a standard error should not be rescued"; end
+ assert_raise(StandardError, bug7688) { @o == nil }
end
def test_gt