File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -2812,13 +2812,14 @@ def visit_write_value(node)
2812
2812
length = elements . length
2813
2813
2814
2814
bounds ( elements . first . location )
2815
- elements . each_with_index . inject ( on_args_new ) do |args , ( element , index ) |
2815
+ elements . each_with_index . inject ( ( elements . first . is_a? ( SplatNode ) && length == 1 ) ? on_mrhs_new : on_args_new ) do |args , ( element , index ) |
2816
2816
arg = visit ( element )
2817
2817
bounds ( element . location )
2818
2818
2819
2819
if index == length - 1
2820
2820
if element . is_a? ( SplatNode )
2821
- on_mrhs_add_star ( on_mrhs_new_from_args ( args ) , arg )
2821
+ mrhs = index == 0 ? args : on_mrhs_new_from_args ( args )
2822
+ on_mrhs_add_star ( mrhs , arg )
2822
2823
else
2823
2824
on_mrhs_add ( on_mrhs_new_from_args ( args ) , arg )
2824
2825
end
Original file line number Diff line number Diff line change @@ -88,15 +88,12 @@ class RipperTest < TestCase
88
88
unparser/corpus/literal/while.txt
89
89
unparser/corpus/semantic/dstr.txt
90
90
unparser/corpus/semantic/while.txt
91
- variables.txt
92
- whitequark/asgn_mrhs.txt
93
91
whitequark/bug_480.txt
94
92
whitequark/dedenting_heredoc.txt
95
93
whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt
96
94
whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt
97
95
whitequark/empty_stmt.txt
98
96
whitequark/if_elsif.txt
99
- whitequark/masgn_splat.txt
100
97
whitequark/parser_bug_640.txt
101
98
whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt
102
99
whitequark/parser_slash_slash_n_escaping_in_literals.txt
You can’t perform that action at this time.
0 commit comments