1
0
Fork 0
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:
Nobuyoshi Nakada 2020-03-03 15:48:53 +09:00
parent 1ad9364440
commit c8d0bf0156
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 4 additions and 0 deletions

View file

@ -3964,11 +3964,13 @@ p_expr_basic : p_value
| tLBRACE
{
$<tbl>$ = push_pktbl(p);
$<flags>1 = p->in;
p->in.kwarg = 0;
}
p_kwargs rbrace
{
pop_pktbl(p, $<tbl>2);
p->in.kwarg = $<flags>1.kwarg;
$$ = new_hash_pattern(p, Qnone, $3, &@$);
}
| tLBRACE rbrace

View file

@ -1060,6 +1060,8 @@ END
in {a:
2}
false
in a: {b:}, c:
p c
in {a:
}
_a = a