Module: Enumerable

Defined in:
lib/overwrite.rb

Instance Method Summary collapse

Instance Method Details

#duplicatesArray


16
17
18
# File 'lib/overwrite.rb', line 16

def duplicates
  inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys
end