Skip to content

Commit 73f2313

Browse files
committed
Revert change to is_local_id as it's not needed
Upon closer inspection, the `isIdentifierChar` in the RubyLexer class can correctly handle non-ascii characters fine, so it doesn't matter if we pass in just the first byte of a multi-byte encoded char, we'll still get the same result. PullRequest: truffleruby/2102
1 parent 3ec4747 commit 73f2313

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/parser/parser/ParserSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ public void warning(SourceIndexLength position, String message) {
14591459

14601460
// ENEBO: Totally weird naming (in MRI is not allocated and is a local var name) [1.9]
14611461
public boolean is_local_id(Rope name) {
1462-
return lexer.isIdentifierChar(name.getString().charAt(0));
1462+
return lexer.isIdentifierChar(name.get(0) & 0xFF);
14631463
}
14641464

14651465
// 1.9

0 commit comments

Comments
 (0)