From 353da8cccd6fdf47fc834ef95c48c95c62af38a6 Mon Sep 17 00:00:00 2001 From: yugui Date: Tue, 23 Dec 2008 11:51:03 +0000 Subject: Revert r20947. This feature is still under development. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- error.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'error.c') diff --git a/error.c b/error.c index 90a7d417e5..c28a855ea7 100644 --- a/error.c +++ b/error.c @@ -554,22 +554,15 @@ exc_set_backtrace(VALUE exc, VALUE bt) static VALUE exc_equal(VALUE exc, VALUE obj) { - VALUE mesg, backtrace; ID id_mesg; if (exc == obj) return Qtrue; + if (rb_obj_class(exc) != rb_obj_class(obj)) + return Qfalse; CONST_ID(id_mesg, "mesg"); - if (rb_obj_class(exc) != rb_obj_class(obj)) { - mesg = rb_funcall(obj, rb_intern("message"), 0, 0); - backtrace = rb_funcall(obj, rb_intern("backtrace"), 0, 0); - } - else { - mesg = rb_attr_get(obj, id_mesg); - backtrace = exc_backtrace(obj); - } - if (!rb_equal(rb_attr_get(exc, id_mesg), mesg)) + if (!rb_equal(rb_attr_get(exc, id_mesg), rb_attr_get(obj, id_mesg))) return Qfalse; - if (!rb_equal(exc_backtrace(exc), backtrace)) + if (!rb_equal(exc_backtrace(exc), exc_backtrace(obj))) return Qfalse; return Qtrue; } -- cgit v1.2.3