ruby-changes:18869
From: nagachika <ko1@a...>
Date: Fri, 18 Feb 2011 00:33:02 +0900 (JST)
Subject: [ruby-changes:18869] Ruby:r30894 (trunk): * compile.c (get_exception_sym2type): guard temporary object from GC.
nagachika 2011-02-18 00:32:55 +0900 (Fri, 18 Feb 2011) New Revision: 30894 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30894 Log: * compile.c (get_exception_sym2type): guard temporary object from GC. Modified files: trunk/ChangeLog trunk/compile.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30893) +++ ChangeLog (revision 30894) @@ -1,3 +1,7 @@ +Fri Feb 18 00:28:39 2011 CHIKANAGA Tomoyuki <nagachika00@g...> + + * compile.c (get_exception_sym2type): guard temporary object from GC. + Thu Feb 17 23:54:29 2011 CHIKANAGA Tomoyuki <nagachika00@g...> * iseq.c (prepare_iseq_build): initialize iseq_compile_data::err_info Index: compile.c =================================================================== --- compile.c (revision 30893) +++ compile.c (revision 30894) @@ -5190,6 +5190,7 @@ { #undef rb_intern #define rb_intern(str) rb_intern_const(str) + VALUE sym_inspect; static VALUE symRescue, symEnsure, symRetry; static VALUE symBreak, symRedo, symNext; @@ -5208,8 +5209,9 @@ if (sym == symBreak) return CATCH_TYPE_BREAK; if (sym == symRedo) return CATCH_TYPE_REDO; if (sym == symNext) return CATCH_TYPE_NEXT; + sym_inspect = rb_inspect(sym); rb_raise(rb_eSyntaxError, "invalid exception symbol: %s", - RSTRING_PTR(rb_inspect(sym))); + RSTRING_PTR(RB_GC_GUARD(sym_inspect))); return 0; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/