summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-16 08:33:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-16 08:33:35 +0000
commitc01aaf60a5ae218a2a2b4de0788553a97519190c (patch)
tree1140490c3ff862b1984856d99760de8306c84985 /vm_eval.c
parent30a5ce7345d314541d2f2013dd3a771c16feee26 (diff)
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.c5
1 files changed, 2 insertions, 3 deletions
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);
}