diff options
author | Aaron Patterson <[email protected]> | 2024-01-25 15:08:44 -0800 |
---|---|---|
committer | Kevin Newton <[email protected]> | 2024-01-30 13:19:06 -0500 |
commit | 8e708e4a077d85e50cd797b2478aba7bfd5e4ac3 (patch) | |
tree | 87aeb4f38b86b2c2a5f6a8ae0e606f93f5a0b637 /lib/prism/debug.rb | |
parent | 6b350bc6e41551161f4be37858c54fcca1a09c46 (diff) |
Update forwarding locals for prism
Diffstat (limited to 'lib/prism/debug.rb')
-rw-r--r-- | lib/prism/debug.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/prism/debug.rb b/lib/prism/debug.rb index 4e8d3f216c..c888436e4d 100644 --- a/lib/prism/debug.rb +++ b/lib/prism/debug.rb @@ -143,7 +143,7 @@ module Prism if params.keyword_rest.is_a?(ForwardingParameterNode) sorted.push(:*, :**, :&, :"...") elsif params.keyword_rest.is_a?(KeywordRestParameterNode) - sorted << params.keyword_rest.name if params.keyword_rest.name + sorted << (params.keyword_rest.name || :**) end # Recurse down the parameter tree to find any destructured @@ -162,7 +162,9 @@ module Prism end end - sorted << params.block.name if params.block&.name + if params.block + sorted << (params.block.name || :&) + end names = sorted.concat(names - sorted) end |