summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index fa7791e38a..a6166596b6 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -848,16 +848,18 @@ vm_search_method(rb_call_info_t *ci, VALUE recv)
VALUE klass = CLASS_OF(recv);
#if OPT_INLINE_METHOD_CACHE
- if (LIKELY(GET_VM_STATE_VERSION() == ci->vmstat && klass == ci->klass)) {
+ if (LIKELY(GET_VM_STATE_VERSION() == ci->vmstat && RCLASS_EXT(klass)->seq == ci->seq && klass == ci->klass)) {
/* cache hit! */
return;
}
#endif
+
ci->me = rb_method_entry(klass, ci->mid, &ci->defined_class);
- ci->call = vm_call_general;
ci->klass = klass;
+ ci->call = vm_call_general;
#if OPT_INLINE_METHOD_CACHE
ci->vmstat = GET_VM_STATE_VERSION();
+ ci->seq = RCLASS_EXT(klass)->seq;
#endif
}