diff options
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c index 41ddb2d1ac..f8cd2d9129 100644 --- a/vm_method.c +++ b/vm_method.c @@ -640,7 +640,12 @@ rb_method_entry_without_refinements(VALUE klass, ID id, } if (defined_class_ptr) *defined_class_ptr = defined_class; - return me; + if (UNDEFINED_METHOD_ENTRY_P(me)) { + return 0; + } + else { + return me; + } } static void |