aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-23 10:24:49 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-23 10:24:49 +0900
commit74c8aaef7dd09043cf9f13381c84022da7f1c253 (patch)
treec64fd79c223944a61b73f42940e32f69fdc62ef3 /vm_method.c
parentda5bd0047d6c961105da210c69d4c88421324b70 (diff)
downloadruby-74c8aaef7dd09043cf9f13381c84022da7f1c253.tar.gz
Just call search_method_protect [Bug #16669]
Diffstat (limited to 'vm_method.c')
-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 *