From: Gavin Sinclair Date: 2004-05-26T07:52:39+09:00 Subject: Re: [RCR] Enumerable#group_by On Wednesday, May 26, 2004, 3:16:27 AM, Michael wrote: > For example: > %w(This is a list of words).group_by {|word| word.size} > would result in: > {5=>["words"], 1=>["a"], 2=>["is", "of"], 4=>["This", "list"]} > Is this useful enough to include into Ruby? I say it is. But if you just want something you can download and use anywhere without reimplementing, 'extensions' implements Enumerable#partition_by. Different name, same thing. Cheers, Gavin