Skip to content

Commit

Permalink
Fix class variable name validity check.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed May 17, 2018
1 parent 967d75e commit d1a0bbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubySymbol.java
Expand Up @@ -261,7 +261,7 @@ public boolean validClassVariableName() {
index == 2 && (!encoding.isDigit(codepoint)) && (encoding.isAlnum(codepoint) || !Encoding.isAscii(codepoint) || codepoint == '_') ||
index > 2 && (encoding.isAlnum(codepoint) || !Encoding.isAscii(codepoint) || codepoint == '_'));

return valid && getBytes().length() >= 2; // FIXME: good enough on length check? Trying to avoid counter.
return valid && getBytes().length() >= 3; // FIXME: good enough on length check? Trying to avoid counter.
}


Expand Down

0 comments on commit d1a0bbf

Please sign in to comment.