File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
lib/prism/translation/parser Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1689,6 +1689,8 @@ def visit_string_node(node)
1689
1689
builder . string_compose ( token ( node . opening_loc ) , children , closing )
1690
1690
elsif node . opening == "?"
1691
1691
builder . character ( [ node . unescaped , srange ( node . location ) ] )
1692
+ elsif node . opening &.start_with? ( "%" ) && node . unescaped . empty?
1693
+ builder . string_compose ( token ( node . opening_loc ) , [ ] , token ( node . closing_loc ) )
1692
1694
else
1693
1695
content_lines = node . content . lines
1694
1696
unescaped_lines = node . unescaped . lines
Original file line number Diff line number Diff line change @@ -68,13 +68,11 @@ class ParserTest < TestCase
68
68
"seattlerb/heredoc_with_only_carriage_returns.txt" ,
69
69
"seattlerb/masgn_double_paren.txt" ,
70
70
"seattlerb/parse_line_heredoc_hardnewline.txt" ,
71
- "seattlerb/pct_nl.txt" ,
72
71
"seattlerb/pctW_lineno.txt" ,
73
72
"seattlerb/regexp_esc_C_slash.txt" ,
74
73
"seattlerb/TestRubyParserShared.txt" ,
75
74
"unparser/corpus/literal/assignment.txt" ,
76
75
"unparser/corpus/literal/block.txt" ,
77
- "unparser/corpus/literal/def.txt" ,
78
76
"unparser/corpus/literal/dstr.txt" ,
79
77
"unparser/corpus/literal/literal.txt" ,
80
78
"unparser/corpus/literal/pattern.txt" ,
You can’t perform that action at this time.
0 commit comments