Skip to content

Commit 6d2a62b

Browse files
author
Lillian Zhang
committed
reorder arguments in condition
1 parent 99999bf commit 6d2a62b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/core/string/StringNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2527,7 +2527,7 @@ private Object performSqueezeBang(RubyString string, Object[] otherStrings) {
25272527

25282528
boolean singlebyte = rope.isSingleByteOptimizable() && otherRope.isSingleByteOptimizable();
25292529

2530-
if (otherStrings.length == 1 && otherRope.characterLength() == 1 && singlebyte) {
2530+
if (singlebyte && otherRope.byteLength() == 1 && otherStrings.length == 1) {
25312531
squeeze[otherRope.getRawBytes()[0]] = true;
25322532
if (!StringSupport.singleByteSqueeze(buffer, squeeze)) {
25332533
return nil;

0 commit comments

Comments
 (0)