* compile.c (get_exception_sym2type): guard temporary object from GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
946e37cfeb
commit
80466e3fc7
@ -1,3 +1,7 @@
|
|||||||
|
Fri Feb 18 00:28:39 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||||
|
|
||||||
|
* compile.c (get_exception_sym2type): guard temporary object from GC.
|
||||||
|
|
||||||
Thu Feb 17 23:54:29 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
Thu Feb 17 23:54:29 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||||
|
|
||||||
* iseq.c (prepare_iseq_build): initialize iseq_compile_data::err_info
|
* iseq.c (prepare_iseq_build): initialize iseq_compile_data::err_info
|
||||||
|
@ -5190,6 +5190,7 @@ get_exception_sym2type(VALUE sym)
|
|||||||
{
|
{
|
||||||
#undef rb_intern
|
#undef rb_intern
|
||||||
#define rb_intern(str) rb_intern_const(str)
|
#define rb_intern(str) rb_intern_const(str)
|
||||||
|
VALUE sym_inspect;
|
||||||
static VALUE symRescue, symEnsure, symRetry;
|
static VALUE symRescue, symEnsure, symRetry;
|
||||||
static VALUE symBreak, symRedo, symNext;
|
static VALUE symBreak, symRedo, symNext;
|
||||||
|
|
||||||
@ -5208,8 +5209,9 @@ get_exception_sym2type(VALUE sym)
|
|||||||
if (sym == symBreak) return CATCH_TYPE_BREAK;
|
if (sym == symBreak) return CATCH_TYPE_BREAK;
|
||||||
if (sym == symRedo) return CATCH_TYPE_REDO;
|
if (sym == symRedo) return CATCH_TYPE_REDO;
|
||||||
if (sym == symNext) return CATCH_TYPE_NEXT;
|
if (sym == symNext) return CATCH_TYPE_NEXT;
|
||||||
|
sym_inspect = rb_inspect(sym);
|
||||||
rb_raise(rb_eSyntaxError, "invalid exception symbol: %s",
|
rb_raise(rb_eSyntaxError, "invalid exception symbol: %s",
|
||||||
RSTRING_PTR(rb_inspect(sym)));
|
RSTRING_PTR(RB_GC_GUARD(sym_inspect)));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user