mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Need to adjust the stack length of the top-level environment; fix #3819
This commit is contained in:
@@ -544,6 +544,13 @@ done:
|
||||
if (args.verbose) {
|
||||
mrb_codedump_all(mrb, proc);
|
||||
}
|
||||
/* adjest stack length of toplevel environment */
|
||||
if (mrb->c->cibase->env) {
|
||||
struct REnv *e = mrb->c->cibase->env;
|
||||
if (MRB_ENV_STACK_LEN(e) < proc->body.irep->nlocals) {
|
||||
MRB_SET_ENV_STACK_LEN(e, proc->body.irep->nlocals);
|
||||
}
|
||||
}
|
||||
/* pass a proc for evaluation */
|
||||
/* evaluate the bytecode */
|
||||
result = mrb_vm_run(mrb,
|
||||
|
||||
Reference in New Issue
Block a user