Commit 0042e586 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2344 from yui-knk/fix-locals

Change to always use locals->car->car.
parents e4b01da9 b5ef16ba
......@@ -253,7 +253,11 @@ local_var_p(parser_state *p, mrb_sym sym)
static void
local_add_f(parser_state *p, mrb_sym sym)
{
p->locals->car = push(p->locals->car, nsym(sym));
if (p->locals->car && !p->locals->car->car) {
p->locals->car->car = nsym(sym);
} else {
p->locals->car = push(p->locals->car, nsym(sym));
}
}
static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment