From 74c8aaef7dd09043cf9f13381c84022da7f1c253 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 23 Apr 2020 10:24:49 +0900 Subject: Just call search_method_protect [Bug #16669] --- vm_method.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'vm_method.c') diff --git a/vm_method.c b/vm_method.c index 1910b1e46d..150fc9d55f 100644 --- a/vm_method.c +++ b/vm_method.c @@ -936,13 +936,7 @@ search_method_protect(VALUE klass, ID id, VALUE *defined_class_ptr) MJIT_FUNC_EXPORTED const rb_method_entry_t * rb_method_entry(VALUE klass, ID id) { - const rb_method_entry_t *me = search_method(klass, id, NULL); - if (me && me->def && me->def->type != VM_METHOD_TYPE_UNDEF) { - return me; - } - else { - return NULL; - } + return search_method_protect(klass, id, NULL); } static inline const rb_callable_method_entry_t * -- cgit v1.2.3