-
Notifications
You must be signed in to change notification settings - Fork 1
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
Quantified capture group breaks $/.list
#5680
Comments
From @smlsWhen 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) /; 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. |
From @lizmatI’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...
|
The RT System itself - Status changed from 'new' to 'open' |
From @lizmatAh, found it: The List iterator assumes that a List cannot have “holes” in it. Apparently it can :-( Going to sleep on how to fix this.
|
From @lizmatFixed (for now at least) with 9b6f2eb5434e71f07bc649 . Tests still needed.
|
From @zoffixznetTests added in Raku/roast@581b553b74 |
@zoffixznet - Status changed from 'open' to 'resolved' |
From @smlsShould it really return `(「a」 (Mu) 「c」)` and not `(「a」 Nil 「c」)`, seeing as $1 is also Nil? liz made it work on the List.iterator end by allowing it to iterate over holes in the list, but maybe Match.list should not produce a list with holes at all, but rather a list with Nil in place of missing captures? If so, then the `is $two.^name, 'Mu'` test added by zoffix is LTA. |
From @AlexDanielShould we reopen this then? |
@AlexDaniel - Status changed from 'resolved' to 'open' |
Migrated from rt.perl.org#129299 (status was 'open')
Searchable as RT129299$
The text was updated successfully, but these errors were encountered: