From: Max Williams Date: 2008-01-21T23:54:23+09:00 Subject: Re: Quick way to split up an array of objects into groups? Xavier Noria wrote: > Note there is an assignment instead of an equals operator there. > >> >> end > > Yes, I think that's equivalent to > > collection.to_set.classify {|x| [x.foo, x.bar]}.values > > plus perhaps a map to_a. > > -- fxn That's not really my code, it's a paraphrased version for clarity :) Cheers for the tip about to_set.classify though. -- Posted via http://www.ruby-forum.com/.