# New Ticket Created by  Alex Jakimenko 
# Please include the string:  [perl #125815]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=125815 >


You can put any negative number (even -Inf) and it will not die:

<AlexDaniel> m: say 'foo foo foo'.subst(/foo/, "bar", :nth(-Inf));
<camelia> rakudo-moar ab73b0: OUTPUT«foo foo foo␤»

However, from https://github.com/rakudo/rakudo/blob/nom/src/core/Str.pm#L606
:
fail "Attempt to retrieve negative match :nth($n)" if $n < 1;

So it seems like it does not work?

Also, it should talk about allowing only positive values because the
conditional is checking for < 1.

Reply via email to