diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-11-10 00:09:33 -0500 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-11-10 21:50:12 +0000 |
commit | 85db7baccb946c6bb463166acdd0fd7b12568d35 (patch) | |
tree | 016a1b967c539c0a5ff1ded95cd341c8e3871da3 /lib | |
parent | 98e5ea94314340c9be37cc490739fd56c772c16b (diff) | |
download | ruby-85db7baccb946c6bb463166acdd0fd7b12568d35.tar.gz |
[ruby/prism] Remove extra locals added by ...
https://github.com/ruby/prism/commit/b7850f2d30
Diffstat (limited to 'lib')
-rw-r--r-- | lib/prism/debug.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/prism/debug.rb b/lib/prism/debug.rb index f5d19dc3df..d0469adc9a 100644 --- a/lib/prism/debug.rb +++ b/lib/prism/debug.rb @@ -133,6 +133,10 @@ module Prism *params.keywords.grep(OptionalKeywordParameterNode).map(&:name), ] + if params.keyword_rest.is_a?(ForwardingParameterNode) + sorted.push(:*, :&, :"...") + end + sorted << AnonymousLocal if params.keywords.any? # Recurse down the parameter tree to find any destructured |