Skip to content

Commit

Permalink
Merge pull request #2843 from ruby/ruby-parser
Browse files Browse the repository at this point in the history
Fix up ruby_parser string concat
  • Loading branch information
kddnewton committed May 24, 2024
2 parents 0ea3485 + 4b06eae commit b68cdba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/prism/translation/ruby_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,8 @@ def visit_interpolated_x_string_node(node)
else
visited << result
end
elsif result[0] == :dstr
visited.concat(result[1..-1])
else
visited << result
end
Expand Down
3 changes: 0 additions & 3 deletions test/prism/ruby_parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,15 @@ class RubyParserTest < TestCase
seattlerb/masgn_colon3.txt
seattlerb/messy_op_asgn_lineno.txt
seattlerb/op_asgn_primary_colon_const_command_call.txt
seattlerb/parse_line_evstr_after_break.txt
seattlerb/regexp_esc_C_slash.txt
seattlerb/str_lit_concat_bad_encodings.txt
unescaping.txt
unparser/corpus/literal/kwbegin.txt
unparser/corpus/literal/send.txt
unparser/corpus/semantic/dstr.txt
whitequark/masgn_const.txt
whitequark/ruby_bug_12402.txt
whitequark/ruby_bug_14690.txt
whitequark/space_args_block.txt
whitequark/string_concat.txt
]

# https://github.com/seattlerb/ruby_parser/issues/344
Expand Down

0 comments on commit b68cdba

Please sign in to comment.