mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Preserve kwarg
flag and fix up f5c904c2a9
This commit is contained in:
parent
1ad9364440
commit
c8d0bf0156
2 changed files with 4 additions and 0 deletions
2
parse.y
2
parse.y
|
@ -3964,11 +3964,13 @@ p_expr_basic : p_value
|
||||||
| tLBRACE
|
| tLBRACE
|
||||||
{
|
{
|
||||||
$<tbl>$ = push_pktbl(p);
|
$<tbl>$ = push_pktbl(p);
|
||||||
|
$<flags>1 = p->in;
|
||||||
p->in.kwarg = 0;
|
p->in.kwarg = 0;
|
||||||
}
|
}
|
||||||
p_kwargs rbrace
|
p_kwargs rbrace
|
||||||
{
|
{
|
||||||
pop_pktbl(p, $<tbl>2);
|
pop_pktbl(p, $<tbl>2);
|
||||||
|
p->in.kwarg = $<flags>1.kwarg;
|
||||||
$$ = new_hash_pattern(p, Qnone, $3, &@$);
|
$$ = new_hash_pattern(p, Qnone, $3, &@$);
|
||||||
}
|
}
|
||||||
| tLBRACE rbrace
|
| tLBRACE rbrace
|
||||||
|
|
|
@ -1060,6 +1060,8 @@ END
|
||||||
in {a:
|
in {a:
|
||||||
2}
|
2}
|
||||||
false
|
false
|
||||||
|
in a: {b:}, c:
|
||||||
|
p c
|
||||||
in {a:
|
in {a:
|
||||||
}
|
}
|
||||||
_a = a
|
_a = a
|
||||||
|
|
Loading…
Add table
Reference in a new issue