diff options
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -230,13 +230,15 @@ setinstancevariable /* Get value of class variable id of klass as val. */ DEFINE_INSN getclassvariable -(ID id) +(ID id, IVC ic) () (VALUE val) /* "class variable access from toplevel" warning can be hooked. */ // attr bool leaf = false; /* has rb_warning() */ { - val = rb_cvar_get(vm_get_cvar_base(vm_get_cref(GET_EP()), GET_CFP(), 1), id); + rb_cref_t * cref = vm_get_cref(GET_EP()); + rb_control_frame_t *cfp = GET_CFP(); + val = vm_getclassvariable(GET_ISEQ(), cref, cfp, id, (ICVARC)ic); } /* Set value of class variable id of klass as val. */ @@ -249,7 +251,7 @@ setclassvariable // attr bool leaf = false; /* has rb_warning() */ { vm_ensure_not_refinement_module(GET_SELF()); - rb_cvar_set(vm_get_cvar_base(vm_get_cref(GET_EP()), GET_CFP(), 1), id, val); + vm_setclassvariable(vm_get_cref(GET_EP()), GET_CFP(), id, val); } /* Get constant variable id. If klass is Qnil and allow_nil is Qtrue, constants |