# New Ticket Created by Moritz Lenz
# Please include the string: [perl #64952]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=64952 >
Consider this:
00:57 <@moritz_> rakudo: 'ab' ~~ m/(.)+/; say $0.WHAT; say $1.WHAT
00:57 < p6eval> rakudo ad7389: OUTPUT«ListFailure»
A quantified positional captures places a List into $0, and nothing into
$1 - that's correct, in my understanding. But when iterating over @($/)
it runs the body of the loop twice:
00:57 <@moritz_> rakudo: .say for @('ab' ~~ m/(.)+/)
00:57 < p6eval> rakudo ad7389: OUTPUT«ab»
That should be one iteration, where $_ is a List of two Match'es.
I also believe that this accounts for a bug in Match.caps, even though I
changed the tests to think otherwise... I'll try to think a bit more
about it tomorrow, after a good portion of sleep ;-)
Cheers,
Moritz