From 45e04c996e101d39564ca5670be1f297281130f9 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 21 Jun 2014 18:24:26 +0900 Subject: clear local variables for the first execution of mrb_context_run(); close #2405 --- src/parse.y | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/parse.y') diff --git a/src/parse.y b/src/parse.y index 2c7e788d9..043c86776 100644 --- a/src/parse.y +++ b/src/parse.y @@ -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) { -- cgit v1.2.3