summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index fc9491f312..8fd6b1ef27 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1903,7 +1903,13 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
no_refinement_dispatch:
if (ci->me->def->body.orig_me) {
ci->me = ci->me->def->body.orig_me;
- goto normal_method_dispatch;
+ if (UNDEFINED_METHOD_ENTRY_P(ci->me)) {
+ ci->me = 0;
+ goto start_method_dispatch;
+ }
+ else {
+ goto normal_method_dispatch;
+ }
}
else {
klass = ci->me->klass;