From: Jimmy Kofler Date: 2007-08-21T17:01:37+09:00 Subject: Re: Detecting duplicates in an array, anything in the standa Duplicates can also be extracted from an array like this: class Array def find_dups uniq.map {|v| (self - [v]).size < (self.size - 1) ? v : nil}.compact end end (The faster, the better; http://snippets.dzone.com/posts/show/4148 ) Cheers, j.k. -- Posted via http://www.ruby-forum.com/.