Skip to content

Commit 5394980

Browse files
committed
Avoid intermediate String to get first char
1 parent 8f226cb commit 5394980

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/parser/lexer/RubyLexer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3497,7 +3497,7 @@ public void validateFormalIdentifier(Rope identifier) {
34973497
compile_error("formal argument cannot be a constant");
34983498
}
34993499

3500-
int first = identifier.getString().charAt(0);
3500+
int first = identifier.get(0) & 0xFF;
35013501

35023502
switch (first) {
35033503
case '@':

0 commit comments

Comments
 (0)