On Fri Jan 02 18:02:41 2009, andy_b...@wiwb.uscourts.gov wrote: > class Prime { > has @!primes is rw; > has Int $!number is rw = 1; > > method next() { > my $not_prime = 1; > > while($not_prime && $!number++) { > $not_prime = @!primes.grep({$!number % $^a == 0}); > } > > Appears that last assignment changes $not_prime.WHAT from "Int" into > "Array".
Correct. And since $not_prime therefore always has at least one element, we end up spinning forever. So, marking this as not-a-bug and closing ticket. Thanks! Pm