From: Max Williams Date: 2008-01-21T20:23:33+09:00 Subject: Quick way to split up an array of objects into groups? I have a collection of objects, which i want to separate into groups based on a particular property (to be specific, two attributes - that is if obj.foo and obj.bar are both the same for two objects they go into an array together). Not every object has a duplicate, but most of them do. So, i'd end up with an array, where each member is another array, with the subarrays holding either 1 or 2 (or maybe more) objects that match on foo and bar. Can anyone tell me a nice and simple way of doing this? thanks max -- Posted via http://www.ruby-forum.com/.