diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-17 13:31:50 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-17 13:31:50 +0000 |
commit | 38687bec0d441d75f552f1582cb104682e8d8402 (patch) | |
tree | 8c5803320d0ec16fc4fd9b18f84c964dd8945a4d /test | |
parent | 70a97f9c2c95bee24bff187df3d3780fd1a98f5b (diff) |
merges r24148 from trunk into ruby_1_9_1.
--
* id.c (Init_id), vm.c (vm_exec): @#__ThrowState__ is no longer
used. [ruby-dev:38760]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_exception.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index cba88f5c90..1eaeb7b3fb 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -223,4 +223,23 @@ class TestException < Test::Unit::TestCase end INPUT end + + def test_safe4 + cmd = proc{raise SystemExit} + safe0_p = proc{|*args| args} + + test_proc = proc { + $SAFE = 4 + begin + cmd.call + rescue SystemExit => e + safe0_p["SystemExit: #{e.inspect}"] + raise e + rescue Exception => e + safe0_p["Exception (NOT SystemExit): #{e.inspect}"] + raise e + end + } + assert_raise(SystemExit, '[ruby-dev:38760]') {test_proc.call} + end end |