diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-28 00:26:27 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-28 00:26:27 +0000 |
commit | be21eb5d0f362bd9ec2922b590c84b7e87592a6c (patch) | |
tree | fa5ccd76a1f9c43f841e377a6d4dc815fd8f5609 /vm_eval.c | |
parent | 3f664b30fc72dde0197d29dde7ad31d9a0e1535a (diff) |
* vm_eval.c (check_funcall_failed): should rescue user raised
NoMethodError. rescue all NoMethodError if receiver does not
respond to the method name. [ruby-dev:39796]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -255,10 +255,9 @@ check_funcall_exec(struct rescue_funcall_args *args) static VALUE check_funcall_failed(struct rescue_funcall_args *args, VALUE e) { - VALUE sym = rb_funcall(e, rb_intern("name"), 0, 0); - - if (args->sym != sym) + if (rb_respond_to(args->recv, args->sym)) { rb_exc_raise(e); + } return Qundef; } |