diff --git a/vm_insnhelper.c b/vm_insnhelper.c index f05e5e1fc7..7075f7c0f2 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -787,7 +787,7 @@ cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, return (rb_cref_t *)new_cref; case imemo_svar: if (can_be_svar) { - return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, FALSE, v); + return cref_replace_with_duplicated_cref_each_frame(&((struct vm_svar *)v)->cref_or_me, FALSE, v); } /* fall through */ case imemo_ment: @@ -877,7 +877,7 @@ rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, FALSE, cref, FALSE); cref = CREF_NEXT(cref); *new_cref_ptr = new_cref; - new_cref_ptr = (rb_cref_t **)&new_cref->next; + new_cref_ptr = &new_cref->next; } *new_cref_ptr = NULL; }