File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -905,8 +905,13 @@ def visit_interpolated_x_string_node(node)
905905 results << result
906906 state = :interpolated_content
907907 end
908- else
909- results << result
908+ when :interpolated_content
909+ if result . is_a? ( Array ) && result [ 0 ] == :str && results [ -1 ] [ 0 ] == :str && ( results [ -1 ] . line_max == result . line )
910+ results [ -1 ] [ 1 ] << result [ 1 ]
911+ results [ -1 ] . line_max = result . line_max
912+ else
913+ results << result
914+ end
910915 end
911916 end
912917 end
Original file line number Diff line number Diff line change @@ -28,19 +28,15 @@ class RubyParserTest < TestCase
2828 base = File . join ( __dir__ , "fixtures" )
2929
3030 todos = %w[
31- heredocs_nested.txt
3231 newline_terminated.txt
3332 regex_char_width.txt
3433 seattlerb/bug169.txt
35- seattlerb/dstr_evstr.txt
36- seattlerb/heredoc_squiggly_interp.txt
3734 seattlerb/masgn_colon3.txt
3835 seattlerb/messy_op_asgn_lineno.txt
3936 seattlerb/op_asgn_primary_colon_const_command_call.txt
4037 seattlerb/parse_line_evstr_after_break.txt
4138 seattlerb/regexp_esc_C_slash.txt
4239 seattlerb/str_lit_concat_bad_encodings.txt
43- seattlerb/str_pct_nested_nested.txt
4440 unescaping.txt
4541 unparser/corpus/literal/kwbegin.txt
4642 unparser/corpus/literal/send.txt
@@ -76,12 +72,10 @@ class RubyParserTest < TestCase
7672 tilde_heredocs.txt
7773 unparser/corpus/literal/literal.txt
7874 while.txt
79- whitequark/class_definition_in_while_cond.txt
8075 whitequark/cond_eflipflop.txt
8176 whitequark/cond_iflipflop.txt
8277 whitequark/cond_match_current_line.txt
8378 whitequark/dedenting_heredoc.txt
84- whitequark/if_while_after_class__since_32.txt
8579 whitequark/lvar_injecting_match.txt
8680 whitequark/not.txt
8781 whitequark/numparam_ruby_bug_19025.txt
You can’t perform that action at this time.
0 commit comments