>> [1, 2, 3, 4, 5, 6, 7].in_groups(3)
=> [[1, 2, 3], [4, 5, nil], [6, 7, nil]]

Note that the in_groups takes 1 from each of the last 2 columns instead 
of 2 from the last.
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to