From 4cfbf8ec95cb321e494a47fe0c82447f2ddbc872 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 29 Mar 2016 13:30:22 +0000 Subject: 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 --- vm_eval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vm_eval.c') 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)) { -- cgit v1.2.3