From 38687bec0d441d75f552f1582cb104682e8d8402 Mon Sep 17 00:00:00 2001 From: yugui Date: Fri, 17 Jul 2009 13:31:50 +0000 Subject: 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 --- test/ruby/test_exception.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') 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 -- cgit v1.2.3