diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-16 08:33:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-16 08:33:35 +0000 |
commit | c01aaf60a5ae218a2a2b4de0788553a97519190c (patch) | |
tree | 1140490c3ff862b1984856d99760de8306c84985 /vm_eval.c | |
parent | 30a5ce7345d314541d2f2013dd3a771c16feee26 (diff) | |
download | ruby-c01aaf60a5ae218a2a2b4de0788553a97519190c.tar.gz |
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
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); } |