From fa1db73335b0e82db914528cba5360ea41ad3514 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Wed, 6 Mar 2024 01:12:57 -0500 Subject: [ruby/prism] Fix up blocks for index nodes in ripper translation https://github.com/ruby/prism/commit/a35eadce47 --- lib/prism/translation/ripper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/prism/translation/ripper.rb') diff --git a/lib/prism/translation/ripper.rb b/lib/prism/translation/ripper.rb index 344913f3e5..d23307dd52 100644 --- a/lib/prism/translation/ripper.rb +++ b/lib/prism/translation/ripper.rb @@ -1538,7 +1538,7 @@ module Prism # ^^^^^^^^^^^^^^^ def visit_index_operator_write_node(node) receiver = visit(node.receiver) - arguments = visit(node.arguments) + arguments, _ = visit_call_node_arguments(node.arguments, node.block, trailing_comma?(node.arguments&.location || node.location, node.closing_loc)) bounds(node.location) target = on_aref_field(receiver, arguments) @@ -1555,7 +1555,7 @@ module Prism # ^^^^^^^^^^^^^^^^ def visit_index_and_write_node(node) receiver = visit(node.receiver) - arguments = visit(node.arguments) + arguments, _ = visit_call_node_arguments(node.arguments, node.block, trailing_comma?(node.arguments&.location || node.location, node.closing_loc)) bounds(node.location) target = on_aref_field(receiver, arguments) @@ -1572,7 +1572,7 @@ module Prism # ^^^^^^^^^^^^^^^^ def visit_index_or_write_node(node) receiver = visit(node.receiver) - arguments = visit(node.arguments) + arguments, _ = visit_call_node_arguments(node.arguments, node.block, trailing_comma?(node.arguments&.location || node.location, node.closing_loc)) bounds(node.location) target = on_aref_field(receiver, arguments) @@ -1589,7 +1589,7 @@ module Prism # ^^^^^^^^ def visit_index_target_node(node) receiver = visit(node.receiver) - arguments = visit(node.arguments) + arguments, _ = visit_call_node_arguments(node.arguments, node.block, trailing_comma?(node.arguments&.location || node.location, node.closing_loc)) bounds(node.location) on_aref_field(receiver, arguments) -- cgit v1.2.3