summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/exception.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/t/exception.rb b/test/t/exception.rb
index 6b46314d0..d68ed8bd7 100644
--- a/test/t/exception.rb
+++ b/test/t/exception.rb
@@ -193,3 +193,39 @@ assert('Exception 10') do
7+7
end == 12
end
+
+assert('Exception 11') do
+ a = :ok
+ begin
+ begin
+ raise Exception
+ rescue
+ a = :ng
+ end
+ rescue Exception
+ end
+ a == :ok
+end
+
+assert('Exception 12') do
+ a = :ok
+ begin
+ raise Exception rescue a = :ng
+ rescue Exception
+ end
+ a == :ok
+end
+
+assert('Exception 13') do
+ a = :ng
+ begin
+ raise StandardError
+ rescue TypeError, ArgumentError
+ a = :ng
+ rescue
+ a = :ok
+ else
+ a = :ng
+ end
+ a == :ok
+end