summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/exception.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/t/exception.rb b/test/t/exception.rb
index 76c165e95..aa707c1b1 100644
--- a/test/t/exception.rb
+++ b/test/t/exception.rb
@@ -30,7 +30,7 @@ end
assert('Exception#to_s', '15.2.22.5.3') do
e = Exception.exception('a')
-
+
e.to_s == 'a'
end
@@ -269,6 +269,24 @@ assert('Exception 14') do
a == :ok
end
+assert('Exception 15') do
+ a = begin
+ :ok
+ rescue
+ :ng
+ end
+ a == :ok
+end
+
+assert('Exception 16') do
+ begin
+ raise "foo"
+ false
+ rescue => e
+ e.message == "foo"
+ end
+end
+
assert('Exception#inspect without message') do
Exception.new.inspect
end