Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test scoping of "{$_}" given ...
  • Loading branch information
TimToady committed Nov 7, 2014
1 parent eee416a commit bdf4af4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S04-statement-modifiers/given.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 6;
plan 7;

# L<S04/"Conditional statements"/Conditional statement modifiers work as in Perl 5>

Expand Down Expand Up @@ -42,4 +42,12 @@ plan 6;
is $i, 13, 'postfix given worked';
}

# RT #100746
#?rakudo todo "RT #100746"
{
$_ = 'bogus';
my @r = gather { take "{$_}" given 'cool' }
is @r[0], 'cool', 'given modifies the $_ that is visible to the {} interpolator';
}

# vim: ft=perl6

0 comments on commit bdf4af4

Please sign in to comment.