mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
clear local variables for the first execution of mrb_context_run(); close #2405
This commit is contained in:
@@ -28,6 +28,7 @@ typedef struct mrbc_context {
|
||||
mrb_bool capture_errors:1;
|
||||
mrb_bool dump_result:1;
|
||||
mrb_bool no_exec:1;
|
||||
mrb_bool keep_lv:1;
|
||||
} mrbc_context;
|
||||
|
||||
mrbc_context* mrbc_context_new(mrb_state *mrb);
|
||||
|
||||
+6
-1
@@ -5558,7 +5558,12 @@ load_exec(mrb_state *mrb, parser_state *p, mrbc_context *c)
|
||||
if (c->target_class) {
|
||||
target = c->target_class;
|
||||
}
|
||||
keep = c->slen + 1;
|
||||
if (c->keep_lv) {
|
||||
keep = c->slen + 1;
|
||||
}
|
||||
else {
|
||||
c->keep_lv = TRUE;
|
||||
}
|
||||
}
|
||||
proc->target_class = target;
|
||||
if (mrb->c->ci) {
|
||||
|
||||
Reference in New Issue
Block a user