From c01aaf60a5ae218a2a2b4de0788553a97519190c Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 16 Nov 2014 08:33:35 +0000 Subject: id.def: move IDs for exception * defs/id.def: add :mesg and :exception and move from other sources. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index 3d2c7fe33a..b14917d0a0 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -25,6 +25,7 @@ static void vm_set_eval_stack(rb_thread_t * th, VALUE iseqval, const NODE *cref, static int vm_collect_local_variables_in_heap(rb_thread_t *th, const VALUE *dfp, const struct local_var_list *vars); static VALUE rb_eUncaughtThrow; +#define id_mesg idMesg /* vm_backtrace.c */ VALUE rb_vm_backtrace_str_ary(rb_thread_t *th, int lev, int n); @@ -1295,9 +1296,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *const cref_arg, VALUE errinfo = th->errinfo; if (file == Qundef) { VALUE mesg, errat, bt2; - ID id_mesg; - CONST_ID(id_mesg, "mesg"); errat = rb_get_backtrace(errinfo); mesg = rb_attr_get(errinfo, id_mesg); if (!NIL_P(errat) && RB_TYPE_P(errat, T_ARRAY) && @@ -1786,7 +1785,7 @@ uncaught_throw_value(VALUE exc) static VALUE uncaught_throw_to_s(VALUE exc) { - VALUE mesg = rb_attr_get(exc, rb_intern("mesg")); + VALUE mesg = rb_attr_get(exc, id_mesg); VALUE tag = uncaught_throw_tag(exc); return rb_str_format(1, &tag, mesg); } -- cgit v1.2.3