summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-12 09:51:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-12 09:51:30 +0000
commit2b988c36bea29718b1518c0c486891634db039d4 (patch)
tree40ae0953c74670fb02adc89a23ec906f1c3d4fe9
parentc0c733791c33579a1bdf12a16a809b5c07b6a7b4 (diff)
vm_eval.c: hook after method_missing
* vm_eval.c (rb_check_funcall_with_hook): call hook after method_missing call when missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--vm_eval.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 78d0ae3..b765ad6 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -483,9 +483,10 @@ rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
me = rb_search_method_entry(recv, mid);
if (!check_funcall_callable(th, me)) {
- (*hook)(FALSE, recv, mid, argc, argv, arg);
- return check_funcall_missing(th, klass, recv, mid, argc, argv,
- respond, Qundef);
+ VALUE ret = check_funcall_missing(th, klass, recv, mid, argc, argv,
+ respond, Qundef);
+ (*hook)(ret != Qundef, recv, mid, argc, argv, arg);
+ return ret;
}
stack_check();
(*hook)(TRUE, recv, mid, argc, argv, arg);