Revert "env referred from top-level callinfo should not be unshared; fix #4019"

This reverts commit 72581696d3.

The #4012 that may have been the trigger for issue #4019 was later reverted by #4039 due to issue #4021.
This commit is contained in:
dearblue
2024-04-05 22:09:20 +09:00
committed by Yukihiro "Matz" Matsumoto
parent d503d9b113
commit 307812ff20
-1
View File
@@ -375,7 +375,6 @@ mrb_env_unshare(mrb_state *mrb, struct REnv *e, mrb_bool noraise)
if (e == NULL) return TRUE;
if (!MRB_ENV_ONSTACK_P(e)) return TRUE;
if (e->cxt != mrb->c) return TRUE;
if (e == CI_ENV(mrb->c->cibase)) return TRUE; /* for mirb */
e->cxt = NULL; /* make possible to GC the fiber that generated the env */