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 --- error.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'error.c') diff --git a/error.c b/error.c index 1e7dac53b6..7aa939f829 100644 --- a/error.c +++ b/error.c @@ -871,9 +871,7 @@ exc_cause(VALUE exc) static VALUE try_convert_to_exception(VALUE obj) { - ID id_exception; - CONST_ID(id_exception, "exception"); - return rb_check_funcall(obj, id_exception, 0, 0); + return rb_check_funcall(obj, idException, 0, 0); } /* @@ -889,10 +887,9 @@ static VALUE exc_equal(VALUE exc, VALUE obj) { VALUE mesg, backtrace; - ID id_mesg; + const ID id_mesg = idMesg; if (exc == obj) return Qtrue; - CONST_ID(id_mesg, "mesg"); if (rb_obj_class(exc) != rb_obj_class(obj)) { int status = 0; -- cgit v1.2.3