aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-11-10 00:09:33 -0500
committergit <svn-admin@ruby-lang.org>2023-11-10 21:50:12 +0000
commit85db7baccb946c6bb463166acdd0fd7b12568d35 (patch)
tree016a1b967c539c0a5ff1ded95cd341c8e3871da3 /lib
parent98e5ea94314340c9be37cc490739fd56c772c16b (diff)
downloadruby-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.rb4
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