Skip to content

Commit 240bb08

Browse files
committed
Share argument logic with calls and keywords in ripper translation
1 parent 8331874 commit 240bb08

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/prism/translation/ripper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ def visit_array_pattern_node(node)
358358
# foo(bar)
359359
# ^^^
360360
def visit_arguments_node(node)
361-
bounds(node.location)
362-
on_args_add_block(visit_arguments(node.arguments), false)
361+
arguments, _ = visit_call_node_arguments(node, nil, false)
362+
arguments
363363
end
364364

365365
# { a: 1 }

test/prism/ripper_test.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,9 @@ class RipperTest < TestCase
6464
seattlerb/parse_line_evstr_after_break.txt
6565
seattlerb/parse_pattern_051.txt
6666
seattlerb/parse_pattern_058.txt
67-
seattlerb/return_call_assocs.txt
6867
seattlerb/stabby_block_iter_call.txt
6968
seattlerb/stabby_block_iter_call_no_target_with_arg.txt
7069
seattlerb/str_lit_concat_bad_encodings.txt
71-
seattlerb/yield_call_assocs.txt
7270
spanning_heredoc.txt
7371
strings.txt
7472
tilde_heredocs.txt

0 commit comments

Comments
 (0)