diff --git a/vm.c b/vm.c index 3719ab8e9a..b7184f4e1c 100644 --- a/vm.c +++ b/vm.c @@ -2380,7 +2380,7 @@ rb_execution_context_mark(const rb_execution_context_t *ec) while (cfp != limit_cfp) { #if VM_CHECK_MODE > 0 const VALUE *ep = cfp->ep; - VM_ASSERT(!!VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) == vm_ep_in_heap_p_(th, ep)); + VM_ASSERT(!!VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) == vm_ep_in_heap_p_(GET_THREAD(), ep)); #endif rb_gc_mark(cfp->self); rb_gc_mark((VALUE)cfp->iseq);