Skip to content

Commit 41fc369

Browse files
committed
We need to remove \r from heredoc strings
1 parent 60abe96 commit 41fc369

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

core/src/main/java/org/jruby/ext/ripper/HeredocTerm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public int parseString(RubyLexer lexer, LexerSource src) throws java.io.IOExcept
143143
case '\n':
144144
pend--;
145145
if (pend == p || lexer.p(pend-1) == '\r') {
146-
pend++;
146+
pend--;
147147
break;
148148
}
149149
break;

core/src/main/java/org/jruby/lexer/yacc/HeredocTerm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public int parseString(RubyLexer lexer) throws java.io.IOException {
126126
case '\n':
127127
pend--;
128128
if (pend == p || lexer.p(pend - 1) == '\r') {
129-
pend++;
129+
pend--;
130130
break;
131131
}
132132
break;

0 commit comments

Comments
 (0)