"Seo ji won" <skidrow / nownuri.net> writes: > but what I want to do is something like this ( sorry, in python semantics, > functions, ;-) > > for i in range(0,100,5): > print i > > of course I can do it like this > for i in 0..19 > print i*5 > end > > but I want to know exactly same way as to range(beg,end,step) Iteration in Ruby is controlled by the object being iterated over, so (for example), you can iterate over an array using array.each do |entry| ... In your case, you;re iterating over numbers, so you'd find the iterators you need in class Integer 0.step(100,5) do |i| ... http://www.rubycentral.com/ref/ref_c_integer.html Regards Dave