summaryrefslogtreecommitdiff
diff options
-rw-r--r--vm_method.c8
1 files changed, 1 insertions, 7 deletions
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 *