summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/yjit.c b/yjit.c
index facddcca0a..afa329e024 100644
--- a/yjit.c
+++ b/yjit.c
@@ -486,7 +486,11 @@ rb_METHOD_ENTRY_VISI(const rb_callable_method_entry_t *me)
rb_method_type_t
rb_get_cme_def_type(const rb_callable_method_entry_t *cme)
{
- return cme->def->type;
+ if (UNDEFINED_METHOD_ENTRY_P(cme)) {
+ return VM_METHOD_TYPE_UNDEF;
+ } else {
+ return cme->def->type;
+ }
}
ID