Skip Menu |
Report information
Id: 131617
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] Any.tail(Callable) violates Iterator protocol
Download (untitled) / with headers
text/plain 671b
The "Died" message should never occur: m: my $s = Seq.new: class :: does Iterator { has @!stuff = <a b c>; has $!ded = 1; method pull-one { $!ded or die; @!stuff ?? shift @!stuff !! $!ded-- && IterationEnd } }.new; say $s.tail: *-10 rakudo-moar 86e7b2: OUTPUT: «Died␤ in method pull-one at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤» Looks like a check that .skip-at-least was successful is missing[^1]. [1] https://github.com/rakudo/rakudo/blob/86e7b2bd25ed62ecd93d83a49b6e2cbfeeb1c24c/src/core/Any-iterable-methods.pm#L1889-L1890 [2] https://github.com/rakudo/rakudo/blob/86e7b2bd25ed62ecd93d83a49b6e2cbfeeb1c24c/src/core/List.pm#L1289-L1298


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org