Skip to content

Commit

Permalink
Add test for RT #122095
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Feb 4, 2015
1 parent 31571a4 commit b4b8ab1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion S04-statements/for.t
Expand Up @@ -4,7 +4,7 @@ use MONKEY_TYPING;

use Test;

plan 87;
plan 88;

=begin description
Expand Down Expand Up @@ -620,4 +620,18 @@ is (for 5 { (sub { "OH HAI" })() }), "OH HAI", 'Anon sub inside for works.';
is $a, 'a', '$0 works in substition in for loop (2)';
}

# RT #122095
{
my class RT122095 {};
my $a = RT122095.new();
my $w = $a.WHICH;
my $good = True;
for 0 .. 20000 {
if $a.WHICH ne $w {
$good = False;
}
};
is $good, True, '.WHICH value did not change in for loop';
}

# vim: ft=perl6

0 comments on commit b4b8ab1

Please sign in to comment.