Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions core/src/main/java/org/jruby/lexer/LexingCommon.java
Original file line number Diff line number Diff line change
@@ -240,17 +240,7 @@ public boolean isGlobalCharPunct(int c) {
* mri: is_identchar
*/
public boolean isIdentifierChar(int c) {
return Character.isLetterOrDigit(c) || c == '_' || isMultiByteChar(c);
}

/**
* Is this a multibyte character from a multibyte encoding?
*
* @param c byte to check against
* @return whether c is an multibyte char or not
*/
protected boolean isMultiByteChar(int c) {
return current_enc.codeToMbcLength(c) != 1;
return c != EOF && (Character.isLetterOrDigit(c) || c == '_' || !isASCII(c));
}

public void lex_goto_eol() {
@@ -541,7 +531,6 @@ public boolean tokadd_ident(int c) {
public boolean tokadd_mbchar(int first_byte) {
int length = precise_mbclen();


if (length <= 0) {
compile_error("invalid multibyte char (" + getEncoding() + ")");
} else if (length > 1) {

0 comments on commit 3d1d49f

Please sign in to comment.