diff --git a/vm_eval.c b/vm_eval.c index 807d560741..ea398e04d2 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -196,15 +196,13 @@ vm_call0_body(rb_thread_t* th, struct rb_calling_info *calling, const struct rb_ const rb_method_type_t type = cc->me->def->type; VALUE super_class = cc->me->defined_class; - if (type == VM_METHOD_TYPE_REFINED) { - if (cc->me->def->body.refined.orig_me) { - cc->me = refined_method_callable_without_refinement(cc->me); - goto again; - } - } - else { + if (type == VM_METHOD_TYPE_ZSUPER) { super_class = RCLASS_ORIGIN(super_class); } + else if (cc->me->def->body.refined.orig_me) { + cc->me = refined_method_callable_without_refinement(cc->me); + goto again; + } super_class = RCLASS_SUPER(super_class);