1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y (dyna_pop_gen): pop dvars. [ruby-dev:39861]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-12-09 16:12:57 +00:00
parent 7cd9a5d363
commit 770b05dd9b
3 changed files with 26 additions and 4 deletions

View file

@ -1,3 +1,7 @@
Thu Dec 10 01:12:55 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (dyna_pop_gen): pop dvars. [ruby-dev:39861]
Thu Dec 10 00:46:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* node.c (dump_node): fixed for long members.

View file

@ -877,3 +877,10 @@ assert_normal_exit %q{
end
end
}, bug2415
assert_normal_exit %q{
a {
b {|c.d| }
e
}
}, '[ruby-dev:39861]'

19
parse.y
View file

@ -8892,13 +8892,10 @@ dyna_push_gen(struct parser_params *parser)
}
static void
dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
dyna_pop_1(struct parser_params *parser)
{
struct vtable *tmp;
while (lvtbl->args != lvargs) {
local_pop();
}
tmp = lvtbl->args;
lvtbl->args = lvtbl->args->prev;
vtable_free(tmp);
@ -8907,6 +8904,20 @@ dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
vtable_free(tmp);
}
static void
dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
{
while (lvtbl->args != lvargs) {
dyna_pop_1(parser);
if (!lvtbl->args) {
struct local_vars *local = lvtbl->prev;
xfree(lvtbl);
lvtbl = local;
}
}
dyna_pop_1(parser);
}
static int
dyna_in_block_gen(struct parser_params *parser)
{