Skip to content

Commit bc7660b

Browse files
committed
Oops, need original bytes here.
1 parent bc2f11d commit bc7660b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/main/java/org/jruby/util/StringSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ public static int rindex(ByteList source, int sourceChars, int subChars, int pos
911911
}
912912

913913
int s = nth(enc, sourceBytes, sbeg, end, pos);
914-
byte[] subBytes = subString.bytes();
914+
byte[] subBytes = subString.unsafeBytes();
915915

916916
// switch to byte size here; this is now MRI:str_rindex
917917
if (subSize == 0) return pos;

0 commit comments

Comments
 (0)