From ebf803aa196e2df4c129b1ec11107363ebbe1382 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 25 Jan 2024 08:43:41 -0500 Subject: [ruby/prism] Fix Ruby head build https://github.com/ruby/prism/commit/149e2ff7f6 --- lib/prism/debug.rb | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'lib') diff --git a/lib/prism/debug.rb b/lib/prism/debug.rb index 24a27d07ef..f4c0bcf91a 100644 --- a/lib/prism/debug.rb +++ b/lib/prism/debug.rb @@ -59,21 +59,7 @@ module Prism stack = [ISeq.new(RubyVM::InstructionSequence.compile(source).to_a)] while (iseq = stack.pop) - names = [*iseq.local_table] - names.map!.with_index do |name, index| - # When an anonymous local variable is present in the iseq's local - # table, it is represented as the stack offset from the top. - # However, when these are dumped to binary and read back in, they - # are replaced with the symbol :#arg_rest. To consistently handle - # this, we replace them here with their index. - if name == :"#arg_rest" - names.length - index + 1 - else - name - end - end - - locals << names + locals << iseq.local_table iseq.each_child { |child| stack << child } end @@ -141,7 +127,7 @@ module Prism sorted << AnonymousLocal if params.keywords.any? if params.keyword_rest.is_a?(ForwardingParameterNode) - sorted.push(:*, :&, :"...") + sorted.push(:*, :**, :&, :"...") elsif params.keyword_rest.is_a?(KeywordRestParameterNode) sorted << params.keyword_rest.name if params.keyword_rest.name end -- cgit v1.2.3