New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.substr on a string built with infix:<x> gives the wrong result in Rakudo on Moar #3646
Comments
From @masak<masak> wow, this is the worst rakudobug I've had in a while. |
From @usev6Î added a test (fudged 'todo' for MoarVM) for the last example to S32-str/substr.t with commit Raku/roast@cf04ac010e. |
@usev6 - Status changed from 'new' to 'open' |
From @zoffixznetStill present on rakudo 89470a: <Zoffix> m: for 2, 3 -> $n { my $s = "0" x $n ~ "1"; say $s, ": ", $s.substr(0, 1) ~ "1" ~ $s.substr(2) } |
From @jnthnOn Thu Jan 15 06:36:57 2015, masak wrote:
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.
Test in S32-str/substr.t unfudged to cover this. |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#123602 (status was 'resolved')
Searchable as RT123602$
The text was updated successfully, but these errors were encountered: