Skip to content

Commit

Permalink
[GR-17457] Optimize Identifiers#isInitialCharacter
Browse files Browse the repository at this point in the history
PullRequest: truffleruby/4143
  • Loading branch information
eregon committed Jan 31, 2024
2 parents 90bfaa0 + 1eb66eb commit 5df847e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/truffleruby/parser/Identifiers.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private static boolean isNameString(String id, int start) {
// MRI: similar to is_identchar but does not allow numeric
@TruffleBoundary
private static boolean isInitialCharacter(int c) {
return Character.isAlphabetic(c) || c == '_' || c >= 128;
return c >= 128 || c == '_' || Character.isAlphabetic(c);
}

private static boolean isConstantFirstCodePoint(int first) {
Expand Down

0 comments on commit 5df847e

Please sign in to comment.