Skip to content

Commit 7c87bbd

Browse files
committed
Wrong value for len.
1 parent 9526ae7 commit 7c87bbd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/src/main/java/org/jruby/RubyString.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3733,7 +3733,7 @@ public IRubyObject scan19(ThreadContext context, IRubyObject pat, Block block) {
37333733
int[] startp = {0};
37343734
byte[] pBytes = value.unsafeBytes();
37353735
int p = value.begin();
3736-
int len = p + value.realSize();
3736+
int len = value.realSize();
37373737

37383738

37393739
pat = getPatternQuoted(context, pat, true);
@@ -3754,7 +3754,7 @@ public IRubyObject scan19(ThreadContext context, IRubyObject pat, Block block) {
37543754
last = prev;
37553755
prev = startp[0];
37563756
block.yieldSpecific(context, result);
3757-
modifyCheck(pBytes, len);
3757+
str.modifyCheck(pBytes, len);
37583758
}
37593759
if (last >= 0) patternSearch(context, pat, str, last, true);
37603760
return this;

0 commit comments

Comments
 (0)