diff options
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -559,10 +559,14 @@ rb_method_call_status(rb_thread_t *th, const rb_method_entry_t *me, call_type sc ID oid; int noex; - if (UNDEFINED_METHOD_ENTRY_P(me) || - UNDEFINED_REFINED_METHOD_P(me->def)) { + if (UNDEFINED_METHOD_ENTRY_P(me)) { + undefined: return scope == CALL_VCALL ? NOEX_VCALL : 0; } + if (me->def->type == VM_METHOD_TYPE_REFINED) { + me = rb_resolve_refined_method(Qnil, me, NULL); + if (UNDEFINED_METHOD_ENTRY_P(me)) goto undefined; + } klass = me->klass; oid = me->def->original_id; noex = me->flag; |