From f166f63f452d21c55a860d26a57b2f815f5c96f2 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Sat, 20 Oct 2012 08:50:51 +0900 Subject: add test case for 750b7c2 --- test/t/exception.rb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'test') 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 -- cgit v1.2.3