From: Stephane Elie Date: 2006-10-02T21:54:58+09:00 Subject: Re: what's wrong in my loop ? Hi Josselin, Tom is right about the "i++". Also, it doesn't look like your pseudo-code matches your ruby code functionality. I'll give it a shot as what you may want to do, just a guess... db = [] record.each do |b| (b.end_at - b.start_at).times { |i| db << [b.start_at+i, i ] } end -- Posted via http://www.ruby-forum.com/.