Kevin Ballard wrote: >Peter Hickman wrote: > > >>Pity you cant seem to do @data.each.each {|i| yield i} as it seems a >>perfect one-liner to me. >> >> > >I'm not quite sure what you would want that line to do. Can you give an >example of less terse, actually functional code that illustrates your >desire? > > > > > Sort of like this (trivial example) data = Array.new data << (1..5) data << (10..20) data.each{|i| puts i} 1..5 10..20 # What I want to work is data.each.each{|i| puts i} 1 2 3 4 5 10 11 12 13 14 15 16 17 18 19 20 # What I have to write is data.each{|i| i.each{|j| puts j}} No great hardship I know but I actually expected data.each.each{...} to work.