Skip to content

Commit

Permalink
Fixes #5062. Regression or bad merge in string interpolation.
Browse files Browse the repository at this point in the history
Changes to peekVariableName regressed a heredoc fix that was only on master.

I will follow up and fix this on jruby-9.1 branch as well.
enebo committed Feb 24, 2018

Unverified

The committer email address is not verified.
1 parent 7924a80 commit d532366
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions core/src/main/java/org/jruby/lexer/yacc/HeredocTerm.java
Original file line number Diff line number Diff line change
@@ -150,12 +150,9 @@ public int parseString(RubyLexer lexer) throws java.io.IOException {
if (c == '#') {
int token = lexer.peekVariableName(RubyParser.tSTRING_DVAR, RubyParser.tSTRING_DBEG);

if (token != 0) {
return token;
} else {
tok.append(c);
c = lexer.nextc();
}
if (token != 0) return token;

tok.append('#');
}

// MRI has extra pointer which makes our code look a little bit more strange in comparison

0 comments on commit d532366

Please sign in to comment.