@@ -1798,7 +1798,7 @@ private int identifier(int c, boolean commandState) {
1798
1798
}
1799
1799
tempVal = createTokenRope ();
1800
1800
1801
- if (result == 0 && isFirstCharacterEncodingAwareUppercase (tempVal )) {
1801
+ if (result == 0 && isFirstCodepointUppercase (tempVal )) {
1802
1802
result = RubyParser .tCONSTANT ;
1803
1803
} else {
1804
1804
result = RubyParser .tIDENTIFIER ;
@@ -3493,7 +3493,7 @@ public boolean update_heredoc_indent(int c) {
3493
3493
}
3494
3494
3495
3495
public void validateFormalIdentifier (Rope identifier ) {
3496
- if (isFirstCharacterEncodingAwareUppercase (identifier )) {
3496
+ if (isFirstCodepointUppercase (identifier )) {
3497
3497
compile_error ("formal argument cannot be a constant" );
3498
3498
}
3499
3499
@@ -3665,9 +3665,9 @@ protected boolean isSpaceArg(int c, boolean spaceSeen) {
3665
3665
return isARG () && spaceSeen && !Character .isWhitespace (c );
3666
3666
}
3667
3667
3668
- /** Encoding-aware (including multi-byte encodings) check of first character of a given rope, usually to determine
3668
+ /** Encoding-aware (including multi-byte encodings) check of first codepoint of a given rope, usually to determine
3669
3669
* if it is a constant */
3670
- private boolean isFirstCharacterEncodingAwareUppercase (Rope rope ) {
3670
+ private boolean isFirstCodepointUppercase (Rope rope ) {
3671
3671
byte [] ropeBytes = rope .getBytes ();
3672
3672
int firstCharacter = rope .encoding .mbcToCode (ropeBytes , 0 , ropeBytes .length );
3673
3673
return rope .encoding .isUpper (firstCharacter );
0 commit comments