Skip to content

Commit

Permalink
Fix up multi write parentheses in ripper translation
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Mar 6, 2024
1 parent 8fa476d commit 41c84df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/prism/translation/ripper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,11 @@ def visit_multi_write_node(node)
end
end

unless node.lparen_loc.nil?
bounds(node.lparen_loc)
targets = on_mlhs_paren(targets)
end

value = visit(node.value)

bounds(node.location)
Expand Down
2 changes: 0 additions & 2 deletions test/prism/ripper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class RipperTest < TestCase
seattlerb/masgn_colon3.txt
seattlerb/masgn_double_paren.txt
seattlerb/masgn_lhs_splat.txt
seattlerb/masgn_paren.txt
seattlerb/masgn_splat_arg.txt
seattlerb/masgn_splat_arg_arg.txt
seattlerb/masgn_star.txt
Expand Down Expand Up @@ -150,7 +149,6 @@ class RipperTest < TestCase
unparser/corpus/literal/case.txt
unparser/corpus/literal/class.txt
unparser/corpus/literal/def.txt
unparser/corpus/literal/defined.txt
unparser/corpus/literal/dstr.txt
unparser/corpus/literal/empty.txt
unparser/corpus/literal/for.txt
Expand Down

0 comments on commit 41c84df

Please sign in to comment.