Stop using ns->top_self here because it's set to th->top_self beforehand if needed

This commit is contained in:
Satoshi Tagomori 2025-06-24 23:11:01 +09:00 committed by Satoshi Tagomori
parent 2100826243
commit c755f35f0e

2
vm.c
View File

@ -794,7 +794,7 @@ vm_set_top_stack(rb_execution_context_t *ec, const rb_iseq_t *iseq, const rb_nam
/* for return */
vm_push_frame(ec, iseq, VM_FRAME_MAGIC_TOP | VM_ENV_FLAG_LOCAL | VM_FRAME_FLAG_FINISH,
ns ? ns->top_self : rb_ec_thread_ptr(ec)->top_self,
rb_ec_thread_ptr(ec)->top_self,
GC_GUARDED_PTR(ns),
(VALUE)vm_cref_new_toplevel(ec), /* cref or me */
ISEQ_BODY(iseq)->iseq_encoded, ec->cfp->sp,