summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 13:30:22 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 13:30:22 +0000
commit4cfbf8ec95cb321e494a47fe0c82447f2ddbc872 (patch)
tree129639a683860b142723b180aeed6323a88b98f1 /vm_eval.c
parent6af6154b418ba392feb6afbc14ef318de4c0e9ef (diff)
merge revision(s) 53695: [Backport #12030]
* vm_eval.c (rb_check_funcall_with_hook): also should call the given hook before returning Qundef when overridden respond_to? method returned false. [ruby-core:73556] [Bug #12030] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 9c9f5fe705..ce95106fbb 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -478,8 +478,10 @@ rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
rb_thread_t *th = GET_THREAD();
int respond = check_funcall_respond_to(th, klass, recv, mid);
- if (!respond)
+ if (!respond) {
+ (*hook)(FALSE, recv, mid, argc, argv, arg);
return Qundef;
+ }
me = rb_search_method_entry(recv, mid);
if (!check_funcall_callable(th, me)) {