On 27.07.2009 00:32, David A. Black wrote: > This was a somewhat incomplete forward reference to my "flipped logic" > version (see below). Ah, thanks for the clarification! > Instead of setting an array to all true and then setting certain ones > to false, I prefer piggybacking on the fact that array values are nil > by default, and set them to true selectively. Absolutely. I would consider though to use a different type of container because the sequence of prime numbers becomes sparse as soon as you reach reasonable large numbers. So using a bit set (either directly or by using Integers) or a Hash seems more appropriate. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/