From: Martin DeMello Date: 2005-06-14T18:35:33+09:00 Subject: Re: finding Hash subsets based on key value James Edward Gray II wrote: > > The Set class has this feature and I even like the name: > > irb(main):001:0> require "set" > => true > irb(main):002:0> langs = Set.new([:perl, :python, :ruby]) > => # > irb(main):003:0> langs.classify { |m| m.to_s[0, 1] } > => {"p"=>#, "r"=>#} That *is* nice - wonder if there'd be any issues with moving it into Enumerable. martin