Skip to content

Commit

Permalink
code in replacement part of s/// has correct scoping
Browse files Browse the repository at this point in the history
RT#128809
  • Loading branch information
zoffixznet committed Aug 17, 2016
1 parent d0f8198 commit 16d333d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions S05-substitution/subst.t
@@ -1,8 +1,9 @@
use v6;

use lib 't/spec/packages';
use Test;
use Test::Util;

plan 179;
plan 180;

# L<S05/Substitution/>

Expand Down Expand Up @@ -568,4 +569,11 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures';
is S:g[(o)] = $0.uc, "fOO", "non-mutating global substitution assignment works ($0)";
}

# RT #128809
{
is_run 'await ^30 .map: { start { S/.+/{$/.chars.print}/ given "abc"; } }', {
:err(''), :out('3' x 30)
}, 'code in replacement part of s/// has correct scoping';
}

# vim: ft=perl6

0 comments on commit 16d333d

Please sign in to comment.