diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-02-24 19:19:14 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-02-24 19:19:14 -0800 |
| commit | 815177afc7f5cef8e447bb9f2878d49fd0bd615c (patch) | |
| tree | 0ea8dea54e340a94fa0b34d48d3eafc0579592d0 /test | |
| parent | bbd50cca2f78c642517beaeccd26400798b1ec46 (diff) | |
| parent | efa18038de038c366c6ee54f47670c80ec068aad (diff) | |
| download | mruby-815177afc7f5cef8e447bb9f2878d49fd0bd615c.tar.gz mruby-815177afc7f5cef8e447bb9f2878d49fd0bd615c.zip | |
Merge pull request #883 from masamitsu-murase/modify_node_rescue_handling
Adjust stack position of NODE_RESCUE.
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/exception.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/t/exception.rb b/test/t/exception.rb index a2e6acc07..663c8f337 100644 --- a/test/t/exception.rb +++ b/test/t/exception.rb @@ -287,6 +287,34 @@ assert('Exception 16') do end end +assert('Exception 17') do + begin + raise "a" # StandardError + rescue ArgumentError + 1 + rescue StandardError + 2 + else + 3 + ensure + 4 + end == 2 +end + +assert('Exception 18') do + begin + 0 + rescue ArgumentError + 1 + rescue StandardError + 2 + else + 3 + ensure + 4 + end == 3 +end + assert('Exception#inspect without message') do Exception.new.inspect end |
