Permalink
Browse files

alphabetic characters can follow digits in $0 variable in interpolation

  • Loading branch information...
1 parent 868d0c6 commit 606e73751fc3eff7d456c115ce288c80479ad811 @bbkr bbkr committed Jul 15, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 S05-match/capturing-contexts.t
@@ -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 " >
@@ -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.