aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c13
1 files 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;
+ }
}
}