diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-11-01 16:12:57 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-11-01 16:12:57 +0800 |
| commit | cdb72a05a294eb8521dd40c011160228496312cb (patch) | |
| tree | 283586ad23f2dc6dfd1fd1aaa354f18c23d8c0d6 /test/t/exception.rb | |
| parent | 88dfaf19aa0808f78d13133d61ea433d043923f9 (diff) | |
| parent | 57910ca5353e1feba1fb069a876b84a52f33d39f (diff) | |
| download | mruby-cdb72a05a294eb8521dd40c011160228496312cb.tar.gz mruby-cdb72a05a294eb8521dd40c011160228496312cb.zip | |
Merge remote-tracking branch 'upstream/master' into mrbgems
Diffstat (limited to 'test/t/exception.rb')
| -rw-r--r-- | test/t/exception.rb | 20 |
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 |
