On Apr 6, 2007, at 6:25 PM, dwyer / o2.ie wrote: > is there an equivalence in Ruby for the nested "for loop" in java. > i want to complete the following: > i is 0 > j is 2 > j is 4 > j is 6 > j is 8 If you are just trying to iterate over the numeric ranges: (0..2).each { |i| 2.step(8, 2) { |j| puts "#{i}, #{j}" } } Gary Wright