Skip to content

Commit a70bc8c

Browse files
committed
Add a note about the bug
1 parent 09c0c8a commit a70bc8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/core/rope/RopeNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ protected Rope withEncodingAsciiCompatible(ManagedRope rope, Encoding encoding,
10751075
} else if (binaryEncodingProfile.profile(encoding == ASCIIEncoding.INSTANCE &&
10761076
rope.getCodeRange() == CR_VALID &&
10771077
rope.getEncoding().isAsciiCompatible())) {
1078-
// ASCII-compatible CR_VALID strings are also CR_VALID in binary.
1078+
// ASCII-compatible CR_VALID strings are also CR_VALID in binary, but they might change character length.
10791079
return cachedRopeClass.cast(rope).withEncoding(ASCIIEncoding.INSTANCE, CR_VALID);
10801080
} else {
10811081
// The rope either has a broken code range or isn't ASCII-compatible. In the case of a broken

0 commit comments

Comments
 (0)