@@ -118,7 +118,6 @@ public int parseString(RubyLexer lexer) {
118
118
// TODO what's in lbuf?
119
119
do { // iterate on lines, while end marker not found
120
120
Rope lbuf = lexer .lexb ;
121
- final int p = 0 ; // TODO inline this
122
121
int pend = lexer .lex_pend ;
123
122
124
123
// Adjust pend so that it doesn't cover the final newline, excepted if the line
@@ -142,17 +141,17 @@ public int parseString(RubyLexer lexer) {
142
141
// if we are dealing with a squiggly heredoc
143
142
if (lexer .getHeredocIndent () > 0 ) {
144
143
// update the indent for the current line
145
- for (int i = 0 ; p + i < pend && lexer .update_heredoc_indent (lexer .p (p + i )); i ++) {
144
+ for (int i = 0 ; i < pend && lexer .update_heredoc_indent (lexer .p (i )); i ++) {
146
145
}
147
146
// reset heredoc_line_indent to 0 (was -1 after we matched the first non-whitespace character)
148
147
lexer .setHeredocLineIndent (0 );
149
148
}
150
149
151
150
if (str != null ) {
152
- str .append (lbuf .getBytes (), p , pend - p );
151
+ str .append (lbuf .getBytes (), 0 , pend );
153
152
} else {
154
153
// lazy initialization of string builder
155
- final RopeBuilder builder = RopeBuilder .createRopeBuilder (lbuf .getBytes (), p , pend - p );
154
+ final RopeBuilder builder = RopeBuilder .createRopeBuilder (lbuf .getBytes (), 0 , pend );
156
155
builder .setEncoding (lbuf .getEncoding ());
157
156
str = builder ;
158
157
}
0 commit comments