diff options
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -746,7 +746,10 @@ exc_equal(VALUE exc, VALUE obj) CONST_ID(id_backtrace, "backtrace"); obj = rb_protect(try_convert_to_exception, obj, &status); - if (status || obj == Qundef) return Qfalse; + if (status || obj == Qundef) { + rb_set_errinfo(Qnil); + 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; |