diff options
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 37229b5dc0..e01d39de77 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1320,7 +1320,9 @@ vm_getclassvariable(const rb_iseq_t *iseq, const rb_control_frame_t *reg_cfp, ID VALUE v = Qundef; RB_DEBUG_COUNTER_INC(cvar_read_inline_hit); - if (st_lookup(RCLASS_IV_TBL(ic->entry->class_value), (st_data_t)id, &v)) { + if (st_lookup(RCLASS_IV_TBL(ic->entry->class_value), (st_data_t)id, &v) && + LIKELY(rb_ractor_main_p())) { + return v; } } |