Skip to content

Commit

Permalink
Fix up return node for ripper translation
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Mar 6, 2024
1 parent a5c3d63 commit c00902a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion lib/prism/translation/ripper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,7 @@ def visit_return_node(node)
arguments = visit(node.arguments)

bounds(node.location)
on_return(on_args_add_block(arguments, false))
on_return(arguments)
end
end

Expand Down
6 changes: 0 additions & 6 deletions test/prism/ripper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class RipperTest < TestCase
regex_char_width.txt
repeat_parameters.txt
rescue.txt
return.txt
seattlerb/TestRubyParserShared.txt
seattlerb/begin_rescue_else_ensure_bodies.txt
seattlerb/begin_rescue_else_ensure_no_bodies.txt
Expand Down Expand Up @@ -140,13 +139,11 @@ class RipperTest < TestCase
seattlerb/module_comments.txt
seattlerb/parse_if_not_canonical.txt
seattlerb/parse_if_not_noncanonical.txt
seattlerb/parse_line_defn_complex.txt
seattlerb/parse_line_dstr_escaped_newline.txt
seattlerb/parse_line_dstr_soft_newline.txt
seattlerb/parse_line_evstr_after_break.txt
seattlerb/parse_line_heredoc_hardnewline.txt
seattlerb/parse_line_multiline_str_literal_n.txt
seattlerb/parse_line_return.txt
seattlerb/parse_line_str_with_newline_escape.txt
seattlerb/parse_opt_call_args_assocs_comma.txt
seattlerb/parse_opt_call_args_lit_comma.txt
Expand Down Expand Up @@ -205,7 +202,6 @@ class RipperTest < TestCase
unparser/corpus/literal/literal.txt
unparser/corpus/literal/module.txt
unparser/corpus/literal/pattern.txt
unparser/corpus/literal/rescue.txt
unparser/corpus/literal/send.txt
unparser/corpus/literal/since/27.txt
unparser/corpus/literal/since/31.txt
Expand Down Expand Up @@ -237,7 +233,6 @@ class RipperTest < TestCase
whitequark/bug_ascii_8bit_in_literal.txt
whitequark/bug_do_block_in_hash_brace.txt
whitequark/bug_heredoc_do.txt
whitequark/bug_interp_single.txt
whitequark/bug_rescue_empty_else.txt
whitequark/case_cond_else.txt
whitequark/case_expr_else.txt
Expand Down Expand Up @@ -277,7 +272,6 @@ class RipperTest < TestCase
whitequark/rescue_else.txt
whitequark/rescue_else_ensure.txt
whitequark/rescue_without_begin_end.txt
whitequark/return.txt
whitequark/return_block.txt
whitequark/ruby_bug_10653.txt
whitequark/ruby_bug_11107.txt
Expand Down

0 comments on commit c00902a

Please sign in to comment.