Marnen Laibow-Koser wrote: > Phillip Koebbe wrote: >> Marnen Laibow-Koser wrote: >>> [...] >>>> ## Column-wise is a bit more work >>>> >>>> irb> row_count = (array.length + (3-1))/3 >>>> => 5 >>>> irb> columns = [] >>>> => [] >>> [...] >>> >>> Why go to all that trouble? in_groups and zip. Done. No arithmetic. >>> >>> Best, >>> -- >>> Marnen Laibow-Koser >>> http://www.marnen.org >>> [email protected] >> > > I'm aware of that. That's why I suggested in_groups *and zip*, which > will do exactly what the OP wanted. > > Please don't only read half of my solution and claim I'm wrong because > you missed the rest.
I didn't realize "zip" was a reference to a method call. I actually thought you were making a reference to something speedy. You know, like "Zip, you're done." Since "zip" was followed by "Done", who was I to question your placement of a period. For that oversight, I'm terribly sorry. Relax. Peace, Phillip -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

