0.step(8, 3) do |i|
  puts i
end

--output:--
0
3
6
-- 
Posted via http://www.ruby-forum.com/.