diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-16 09:28:12 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-16 09:28:12 +0000 |
| commit | ef4f7cd0e28f546a0f685e07b4eec0c631a491ff (patch) | |
| tree | 8c075abf8217608de305500a5276244d4abe58f9 /test/ruby | |
| parent | a8142b66fb42c64c4454cc7bf2b1b480459a7439 (diff) | |
| download | ruby-ef4f7cd0e28f546a0f685e07b4eec0c631a491ff.tar.gz ruby-ef4f7cd0e28f546a0f685e07b4eec0c631a491ff.tar.xz ruby-ef4f7cd0e28f546a0f685e07b4eec0c631a491ff.zip | |
* id.c (Init_id), vm.c (vm_exec): @#__ThrowState__ is no longer
used. [ruby-dev:38760]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -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 cba88f5c9..1eaeb7b3f 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 |
