From: "Peña, Botp" Date: 2007-08-21T12:33:45+09:00 Subject: Re: Detecting duplicates in an array, anything in the standard library ? From: Thibaut Barr�re [mailto:thibaut.barrere@gmail.com] # inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys sshhh, in ruby1.9, i think you just do group_by{|e|e}.select{|_,v| v.size>1}.keys yes, yes, hash#select now hopefully returns hash. can't we have group_by now ? :) kind regards -botp