aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-02-27 10:47:23 +0900
committerKoichi Sasada <ko1@atdot.net>2020-02-27 10:50:20 +0900
commit18674aef0d8199958dbda21eff5167dfc4a5de9a (patch)
tree6d3d072ffab5b3ef4eb212302097e39b55571cd9 /vm_insnhelper.c
parent1d81baf3c1507cbe5e75b08a833761122e68444b (diff)
downloadruby-18674aef0d8199958dbda21eff5167dfc4a5de9a.tar.gz
check imemo_type
check imemo_type to debug http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/2744755
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;
+ }
}
}