Skip to content

Commit

Permalink
alphabetic characters can follow digits in $0 variable in interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
bbkr committed Jul 15, 2012
1 parent 868d0c6 commit 606e737
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S05-match/capturing-contexts.t
Expand Up @@ -4,7 +4,7 @@ use MONKEY_TYPING;
use Test;
BEGIN { @*INC.push('t/spec/packages/') };
use Test::Util;
plan 36;
plan 38;

# old: L<S05/Return values from matches/"A match always returns a Match object" >
# L<S05/Match objects/"A match always returns a " >
Expand Down Expand Up @@ -143,6 +143,14 @@ is_run( q{'aa' ~~ /(.)$1/},
is $x, 2, '$/.list does not flattens subcaptures';
}

# RT 74180
{
my $s;
try { $s = eval '"foo" ~~ /(foo)/; "$0a"' };
ok not $!, 'alphabetic characters can follow digits in $0 variable in interpolation';
is $s, 'fooa', 'alphabetic characters follows $0 interpolated value';
}

done;

# vim: ft=perl6

0 comments on commit 606e737

Please sign in to comment.