aboutsummaryrefslogtreecommitdiffstats
path: root/lib/prism/debug.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/prism/debug.rb')
-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