Charlie Bowman wrote: > As a side thought. Why doesn't the nil class have an each method that > returns nothing. It seems that this problem comes up quite often. > irb(main):001:0> a = nil => nil irb(main):002:0> a.to_a => [] irb(main):003:0> a.to_a.each {|n| puts "The index is: #{n.index}"} => [] irb(main):004:0> Does this suit? Regards, Jim -- Posted via http://www.ruby-forum.com/.