Permalink
Browse files

[t/spec] tests for RT #64886 For (1..10000000000) bug

git-svn-id: http://svn.pugscode.org/pugs@31871 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 6f2dd51 commit c987a6072e4a9e6054a9099f98dbf114e79b2eb5 bbkr committed Jul 30, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 S04-statements/for.t
View
@@ -478,6 +478,16 @@ eval 'for (my $x; $x <=3; $x++) { $i; }'; diag($!);
ok $! ~~ / 'C-style' /, 'Sensible error message';
}
+# RT #64886
+{
+ my $a = 0;
+ for (1..10000000000) {
+ $a++;
+ last;
+ }
+ is $a, 1, 'for on Range with huge max value is lazy and enters block';
+}
+
done_testing;
# vim: ft=perl6

0 comments on commit c987a60

Please sign in to comment.