From: Jakub Date: 2010-05-17T18:10:11+09:00 Subject: Real life use of each_cons? (... follow up) Hi there! (following up the discussion from last year) This method actually made my life a lot easier when fitting some data to a table. I had tens of pictures and wanted to show them in rows - three columns each. data.each_cons(3) do |column| column.each do |picture| show picture end end I was playing with indices, modulos and stuff. After refactoring with each_cons, the code looked much cleaner. cheers!