Skip to content

Commit

Permalink
RT #77646, same &eval executed multiple times without outer block
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jan 6, 2012
1 parent 182e758 commit 901c278
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S29-context/eval.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 14;
plan 15;

# L<S29/Context/"=item eval">

Expand Down Expand Up @@ -69,5 +69,12 @@ is eval("'møp'".encode('UTF-8')), 'møp', 'eval(Buf)';
is eval $number, $number, 'eval of non-string variable works';
}

# RT #77646
{
my $x = 0;
eval '$x++' for 1..4;
is $x, 4, 'can execute the same eval multiple times, without surrounding block';

}

# vim: ft=perl6

0 comments on commit 901c278

Please sign in to comment.