On Thu Jan 15 06:36:57 2015, masak wrote:
> <masak> since I know a tiny bit about how strings are implemented on
> Moar, I predict that the bug will be tracked down in how string
> repetitions are handled.

It was exactly that. There is a fast path for jumping through strands and 
repetitions to the correct point, and it failed to account for the fact that 
the next char you read would come from the *next* repetition that we didn't 
fully skip over, leading to an off-by-one.

> <masak> p6: say ("0" x 3 ~ "1").substr(2)
> <camelia> rakudo-moar 0bb3ad: OUTPUT«00␤»
> <camelia> ..rakudo-parrot 0bb3ad: OUTPUT«01␤»
> <masak> even golfer.

Test in S32-str/substr.t unfudged to cover this.

Reply via email to