Skip to content

Commit

Permalink
RT #96424, capture from unsuccessful match
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Oct 7, 2011
1 parent 2278414 commit b47bf2d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S05-capture/subrule.t
Expand Up @@ -12,7 +12,7 @@ be valid perl6.
=end pod

plan 34;
plan 36;

# L<S05/Match objects/When used as a hash>

Expand Down Expand Up @@ -79,4 +79,10 @@ is(~$/<caprep>[0], "abcabcabcabc", 'Caprep abc one captured');
is $<alpha>, 'a', 'failed !~~ still makes $<foo> available';
}

# RT #96424
{
ok '0' ~~ /<alpha>|<digit>/, 'regex matches';
is $<alpha>.Str, '', 'Can call methods on captures from unsuccessful matches';
}

# vim: ft=perl6

0 comments on commit b47bf2d

Please sign in to comment.