summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-02-13 03:28:40 +0900
committerKoichi Sasada <ko1@atdot.net>2020-02-13 03:30:22 +0900
commit99a8742067ba262eb324615bfac770d1aea53b07 (patch)
tree1c44bdd97466d9571bf171d2a97c7ecfc08ff0bf /vm_insnhelper.c
parentbc1dbed16c647c556725481e38fc2e857e162fd6 (diff)
should be compared with called_id
me->called_id and me->def->original_id can be different sometimes so we should compare with called_id, which is mtbl's key. (fix GH-PR #2869)
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 9404b0d74a..acd5de4d5e 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3161,7 +3161,7 @@ vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *c
if (LIKELY(RB_DEBUG_COUNTER_INC_UNLESS(mc_global_state_miss,
GET_GLOBAL_METHOD_STATE() == cc->method_state) &&
cc->class_serial[0] == RCLASS_SERIAL(klass)) &&
- cc->me && ci->mid == cc->me->def->original_id) {
+ cc->me && ci->mid == cc->me->called_id) {
VM_ASSERT(cc->call != NULL);
RB_DEBUG_COUNTER_INC(mc_inline_hit);
return;