From: Rick DeNatale Date: 2008-04-18T20:10:50+09:00 Subject: Re: Naming question On Fri, Apr 18, 2008 at 4:02 AM, Peņa, Botp wrote: > From: Robert Dober [mailto:robert.dober@gmail.com] > # module Enumerable > > # def partition_by &blk > # result = Hash.new {|h,k| h[k] = [] } > # each do | element | > # result[ element ] << blk.call element > # end > # result > # end > # end > > i think this is #group_by in 1.8.7 and 1.9 ? Which, I believe, first showed up in Rails sometime in 2006. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/