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
:nth(-666) is intended to die, but it does not #4475
Comments
From @AlexDanielYou can put any negative number (even -Inf) and it will not die: <AlexDaniel> m: say 'foo foo foo'.subst(/foo/, "bar", :nth(-Inf)); However, from https://github.com/rakudo/rakudo/blob/nom/src/core/Str.pm#L606 So it seems like it does not work? Also, it should talk about allowing only positive values because the |
From @usev6This seems to work now: $ perl6 -e 'say "foo foo foo".subst(/foo/, "bar", :nth(-Inf));' skids++ added tests with commit e502eaf9. For some reason a few of those tests still fail (do not die) on rakudo.jvm. I'll flag this ticket as [JVM] and use it to fudge those failing tests. |
1 similar comment
From @usev6This seems to work now: $ perl6 -e 'say "foo foo foo".subst(/foo/, "bar", :nth(-Inf));' skids++ added tests with commit e502eaf9. For some reason a few of those tests still fail (do not die) on rakudo.jvm. I'll flag this ticket as [JVM] and use it to fudge those failing tests. |
@usev6 - Status changed from 'new' to 'open' |
From @usev6The failing tests on JVM behave correctly, when executed on the command line: $ perl6-j -e 'my $data = "f fo foo fooo foooo fooooo foooooo"; $data ~~ m:nth(-1)/fo+/; say "alive"' The same code in the test file (using 'throws-like') does not die. So, maybe the problem is somewhere else. |
1 similar comment
From @usev6The failing tests on JVM behave correctly, when executed on the command line: $ perl6-j -e 'my $data = "f fo foo fooo foooo fooooo foooooo"; $data ~~ m:nth(-1)/fo+/; say "alive"' The same code in the test file (using 'throws-like') does not die. So, maybe the problem is somewhere else. |
From @usev6All the tests fudged with this ticket number are passing now: Raku/roast@8d39a9b I'm closing this ticket as 'resolved'. |
1 similar comment
From @usev6All the tests fudged with this ticket number are passing now: Raku/roast@8d39a9b I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#125815 (status was 'resolved')
Searchable as RT125815$
The text was updated successfully, but these errors were encountered: