зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
c0c733791c
Коммит
2b988c36be
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче