ruby-changes:61705
From: Kazuki <ko1@a...>
Date: Sun, 14 Jun 2020 09:28:10 +0900 (JST)
Subject: [ruby-changes:61705] f7906a7e31 (master): push_pktbl is needed for hash pattern, not for array pattern
https://git.ruby-lang.org/ruby.git/commit/?id=f7906a7e31 From f7906a7e31e6b1cfa135ecea69deb8827e8c8803 Mon Sep 17 00:00:00 2001 From: Kazuki Tsujimoto <kazuki@c...> Date: Sun, 14 Jun 2020 09:23:43 +0900 Subject: push_pktbl is needed for hash pattern, not for array pattern diff --git a/parse.y b/parse.y index 6d35545..3864066 100644 --- a/parse.y +++ b/parse.y @@ -4048,10 +4048,9 @@ p_expr_basic : p_value https://github.com/ruby/ruby/blob/trunk/parse.y#L4048 $$ = 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 { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/