mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Clear top level env in mrb_top_run(); fix #3643
This commit is contained in:
@@ -2740,7 +2740,11 @@ mrb_top_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int sta
|
||||
mrb_callinfo *ci;
|
||||
mrb_value v;
|
||||
|
||||
if (!mrb->c->cibase || mrb->c->ci == mrb->c->cibase) {
|
||||
if (!mrb->c->cibase) {
|
||||
return mrb_vm_run(mrb, proc, self, stack_keep);
|
||||
}
|
||||
if (mrb->c->ci == mrb->c->cibase) {
|
||||
mrb->c->ci->env = NULL;
|
||||
return mrb_vm_run(mrb, proc, self, stack_keep);
|
||||
}
|
||||
ci = cipush(mrb);
|
||||
|
||||
Reference in New Issue
Block a user