From 18674aef0d8199958dbda21eff5167dfc4a5de9a Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Thu, 27 Feb 2020 10:47:23 +0900 Subject: [PATCH] check imemo_type check imemo_type to debug http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/2744755 --- vm_insnhelper.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/vm_insnhelper.c b/vm_insnhelper.c index c6e5c671d6..87f785c124 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -117,11 +117,18 @@ callable_class_p(VALUE klass) static int callable_method_entry_p(const rb_callable_method_entry_t *cme) { - if (cme == NULL || callable_class_p(cme->defined_class)) { - return TRUE; + if (cme == NULL) { + return TRUE; } else { - return FALSE; + VM_ASSERT(IMEMO_TYPE_P((VALUE)cme, imemo_ment)); + + if (callable_class_p(cme->defined_class)) { + return TRUE; + } + else { + return FALSE; + } } }