From 606e73751fc3eff7d456c115ce288c80479ad811 Mon Sep 17 00:00:00 2001 From: Pawel Pabian Date: Sun, 15 Jul 2012 15:34:44 +0200 Subject: [PATCH] alphabetic characters can follow digits in $0 variable in interpolation --- S05-match/capturing-contexts.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/S05-match/capturing-contexts.t b/S05-match/capturing-contexts.t index 73390e4cb4..b5843732a5 100644 --- a/S05-match/capturing-contexts.t +++ b/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 # L @@ -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