def uniq_by #:yield: h = {}; inject([]) {|a,x| h[yield(x)] ||= a << x} end
http://facets.rubyforge.org/src/doc/rdoc/core/classes/Enumerable.html#M001321
def uniq_by #:yield: h = {}; inject([]) {|a,x| h[yield(x)] ||= a << x} end
http://facets.rubyforge.org/src/doc/rdoc/core/classes/Enumerable.html#M001321