ruby-changes:12472
From: yugui <ko1@a...>
Date: Fri, 17 Jul 2009 22:32:10 +0900 (JST)
Subject: [ruby-changes:12472] Ruby:r24172 (ruby_1_9_1): merges r24148 from trunk into ruby_1_9_1.
yugui 2009-07-17 22:31:50 +0900 (Fri, 17 Jul 2009) New Revision: 24172 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24172 Log: 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] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/eval.c branches/ruby_1_9_1/test/ruby/test_exception.rb branches/ruby_1_9_1/version.h branches/ruby_1_9_1/vm.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 24171) +++ ruby_1_9_1/ChangeLog (revision 24172) @@ -1,3 +1,8 @@ +Thu Jul 16 18:28:09 2009 Nobuyoshi Nakada <nobu@r...> + + * id.c (Init_id), vm.c (vm_exec): @#__ThrowState__ is no longer + used. [ruby-dev:38760] + Thu Jul 16 08:56:32 2009 Koichi Sasada <ko1@a...> * dir.c (push_glob): re-fix GC problem. Index: ruby_1_9_1/eval.c =================================================================== --- ruby_1_9_1/eval.c (revision 24171) +++ ruby_1_9_1/eval.c (revision 24172) @@ -1065,7 +1065,6 @@ exception_error = rb_exc_new3(rb_eFatal, rb_obj_freeze(rb_str_new2("exception reentered"))); - rb_ivar_set(exception_error, idThrowState, INT2FIX(TAG_FATAL)); OBJ_TAINT(exception_error); OBJ_FREEZE(exception_error); } Index: ruby_1_9_1/vm.c =================================================================== --- ruby_1_9_1/vm.c (revision 24171) +++ ruby_1_9_1/vm.c (revision 24172) @@ -1093,11 +1093,6 @@ err = th->errinfo; - if (state == TAG_RAISE) { - if (OBJ_FROZEN(err)) rb_exc_raise(err); - rb_ivar_set(err, idThrowState, INT2FIX(state)); - } - exception_handler: cont_pc = cont_sp = catch_iseqval = 0; Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 24171) +++ ruby_1_9_1/version.h (revision 24172) @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-07-16" -#define RUBY_PATCHLEVEL 241 +#define RUBY_PATCHLEVEL 242 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_1/test/ruby/test_exception.rb =================================================================== --- ruby_1_9_1/test/ruby/test_exception.rb (revision 24171) +++ ruby_1_9_1/test/ruby/test_exception.rb (revision 24172) @@ -223,4 +223,23 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/