Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -2116,8 +2116,8 @@ public DynamicObject reverse(DynamicObject string) {

public static boolean reverseIsEqualToSelf(DynamicObject string) {
assert RubyGuards.isRubyString(string);
// TODO (nirvdrum 08-Jan-16) I suspect this invariant holds for multi-byte characters as well. If we have the logical string length calculated already, we can use it here as well.
return rope(string).byteLength() <= 1;

return rope(string).characterLength() <= 1;
}
}

0 comments on commit 71fd81b

Please sign in to comment.