I’m looking into this.  This appears to be an artefact of .gist on the list, 
caused by the say.  Which also happens for .perl on the list.

say $/.list.Str;          # a  c

Suspecting the gistseen/perlseen machinery now.  Investigating...


> On 18 Sep 2016, at 19:30, Sam S. (via RT) <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> # New Ticket Created by  Sam S. 
> # Please include the string:  [perl #129299]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=129299 >
> 
> 
> When a quantified capture group matched zero times but the overall regex 
> matches, then the List returned from `$/.list` stops iterating before the 
> corresponding element:
> 
>    "ac" ~~ / (a) (b)? (c) /;
>    say ($0, $1, $2);         # (「a」 Nil 「c」)
>    say $/.list;              # (「a」)
>    say $/.list.map({1});     # (1)
>    say $/.list.elems;        # 3
>    say $/.list[0, 1, 2, 3];  # (「a」 (Mu) 「c」 Nil
> 
> Expected behavior would be for `$/.list;` to return `(「a」 Nil 「c」)`.
> 
> mst++ suggested that maybe an InterationEnd is ending up where it shouldn't 
> be.

Reply via email to