From: Prateek Agarwal Date: 2009-07-29T04:16:31+09:00 Subject: What does the step() method do I have to write a program to implement the Sieve of Erastosthenes algorithm for finding the prime nos. I got the following code on scriptol.org top = 100 sieve = [] for i in 2 .. top sieve[i] = i end for i in 2 .. Math.sqrt(top) next unless sieve[i] (i*i).step(top, i) do |j| sieve[j] = nil end end puts sieve Can someone please tell me what's happening in the lines next unless sieve[i] (i*i).step(top,i) do |j| sieve[j]=nil -- Posted via http://www.ruby-forum.com/.