summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-06-21 18:24:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-06-21 18:24:26 +0900
commit45e04c996e101d39564ca5670be1f297281130f9 (patch)
tree1b4525eed77e672980d83d604f316e6a3d56b730 /src/parse.y
parent9f25e3f3beac4b5fd3d01ea1adaad00e5d4e43f5 (diff)
downloadmruby-45e04c996e101d39564ca5670be1f297281130f9.tar.gz
mruby-45e04c996e101d39564ca5670be1f297281130f9.zip
clear local variables for the first execution of mrb_context_run(); close #2405
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y7
1 files changed, 6 insertions, 1 deletions
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) {