summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-13 23:41:55 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-13 23:41:55 +0000
commit1648e9442dd4a6824bef16f7a45e8cc927aef4f5 (patch)
tree6b7b60f5847f1a9ca830c2ca0ac437914ccac473 /error.c
parent23506c427d35bca172a3fd5cd2a5e2187c60c6c4 (diff)
Revert "* error.c (exc_equal): try implicit conversion for delegator."
This reverts commit r34291 because it breaks objects whose "exception" method doesn't allow no argument like XMLRPC::FaultException class. To reproduce: `RuntimeError.new == XMLRPC::FaultException`. [ruby-core:41979] [Bug #5865] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/error.c b/error.c
index a600b171db..6844f992a6 100644
--- a/error.c
+++ b/error.c
@@ -732,14 +732,10 @@ exc_equal(VALUE exc, VALUE obj)
CONST_ID(id_mesg, "mesg");
if (rb_obj_class(exc) != rb_obj_class(obj)) {
- ID id_exception, id_message, id_backtrace;
- CONST_ID(id_exception, "exception");
+ ID id_message, id_backtrace;
CONST_ID(id_message, "message");
CONST_ID(id_backtrace, "backtrace");
- obj = rb_check_funcall(obj, id_exception, 0, 0);
- if (obj == Qundef) return Qfalse;
- if (rb_obj_class(exc) != rb_obj_class(obj)) return Qfalse;
mesg = rb_check_funcall(obj, id_message, 0, 0);
if (mesg == Qundef) return Qfalse;
backtrace = rb_check_funcall(obj, id_backtrace, 0, 0);