Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Original file line number Diff line number Diff line change
@@ -813,7 +813,7 @@ private int getIntegerToken(String value, int radix, int suffix) {
* mri: is_identchar
*/
public boolean isIdentifierChar(int c) {
return Character.isLetterOrDigit(c) || c == '_' || isMultiByteChar(c);
return !eofp && (Character.isLetterOrDigit(c) || c == '_' || isMultiByteChar(c));
}

public boolean isASCII(int c) {
@@ -1886,7 +1886,7 @@ private int identifier(int c, boolean commandState) throws IOException {
do {
if (!tokadd_mbchar(c)) return EOF;
c = nextc();
} while (c != EOF && isIdentifierChar(c));
} while (isIdentifierChar(c));

boolean lastBangOrPredicate = false;

0 comments on commit 71d91ca

Please sign in to comment.