summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index 0f25c514a8..ffb290d601 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -977,7 +977,8 @@ search_method0(VALUE klass, ID id, VALUE *defined_class_ptr, bool skip_refined)
for (; klass; klass = RCLASS_SUPER(klass)) {
RB_DEBUG_COUNTER_INC(mc_search_super);
if ((me = lookup_method_table(klass, id)) != 0) {
- if (!skip_refined || me->def->type != VM_METHOD_TYPE_REFINED) {
+ if (!skip_refined || me->def->type != VM_METHOD_TYPE_REFINED ||
+ me->def->body.refined.orig_me) {
break;
}
}