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