Skip to content

Commit 41c84df

Browse files
committed
Fix up multi write parentheses in ripper translation
1 parent 8fa476d commit 41c84df

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/prism/translation/ripper.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,6 +1936,11 @@ def visit_multi_write_node(node)
19361936
end
19371937
end
19381938

1939+
unless node.lparen_loc.nil?
1940+
bounds(node.lparen_loc)
1941+
targets = on_mlhs_paren(targets)
1942+
end
1943+
19391944
value = visit(node.value)
19401945

19411946
bounds(node.location)

test/prism/ripper_test.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ class RipperTest < TestCase
9999
seattlerb/masgn_colon3.txt
100100
seattlerb/masgn_double_paren.txt
101101
seattlerb/masgn_lhs_splat.txt
102-
seattlerb/masgn_paren.txt
103102
seattlerb/masgn_splat_arg.txt
104103
seattlerb/masgn_splat_arg_arg.txt
105104
seattlerb/masgn_star.txt
@@ -150,7 +149,6 @@ class RipperTest < TestCase
150149
unparser/corpus/literal/case.txt
151150
unparser/corpus/literal/class.txt
152151
unparser/corpus/literal/def.txt
153-
unparser/corpus/literal/defined.txt
154152
unparser/corpus/literal/dstr.txt
155153
unparser/corpus/literal/empty.txt
156154
unparser/corpus/literal/for.txt

0 commit comments

Comments
 (0)