mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
push_pktbl is needed for hash pattern, not for array pattern
This commit is contained in:
parent
a451648b21
commit
f7906a7e31
1 changed files with 2 additions and 3 deletions
5
parse.y
5
parse.y
|
@ -4048,10 +4048,9 @@ p_expr_basic : p_value
|
|||
$$ = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &@$);
|
||||
$$ = new_array_pattern(p, $1, Qnone, $$, &@$);
|
||||
}
|
||||
| tLBRACK {$<tbl>$ = push_pktbl(p);} p_args rbracket
|
||||
| tLBRACK p_args rbracket
|
||||
{
|
||||
pop_pktbl(p, $<tbl>2);
|
||||
$$ = new_array_pattern(p, Qnone, Qnone, $3, &@$);
|
||||
$$ = new_array_pattern(p, Qnone, Qnone, $2, &@$);
|
||||
}
|
||||
| tLBRACK rbracket
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue