mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Enable refinements to public_send.
[Feature #15326] [Fix GH-2019] From: manga_osyo <manga.osyo@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a15e08006
commit
633fef6dec
4 changed files with 64 additions and 3 deletions
12
vm_eval.c
12
vm_eval.c
|
@ -290,8 +290,16 @@ rb_call0(rb_execution_context_t *ec,
|
|||
VALUE recv, ID mid, int argc, const VALUE *argv,
|
||||
call_type scope, VALUE self)
|
||||
{
|
||||
const rb_callable_method_entry_t *me = rb_search_method_entry(recv, mid);
|
||||
enum method_missing_reason call_status = rb_method_call_status(ec, me, scope, self);
|
||||
const rb_callable_method_entry_t *me;
|
||||
enum method_missing_reason call_status;
|
||||
|
||||
if (scope == CALL_PUBLIC) {
|
||||
me = rb_callable_method_entry_with_refinements(CLASS_OF(recv), mid, NULL);
|
||||
}
|
||||
else {
|
||||
me = rb_search_method_entry(recv, mid);
|
||||
}
|
||||
call_status = rb_method_call_status(ec, me, scope, self);
|
||||
|
||||
if (call_status != MISSING_NONE) {
|
||||
return method_missing(recv, mid, argc, argv, call_status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue