On Oct 27, 2006, at 10:35 AM, Nico Landgraf wrote:

> aTemp =  [1, 1, 2, 2, 3, 4]

Here's a one-liner:

irb> aTemp.reject { |x| (aTemp - [x]).size == aTemp.size - 1 }.uniq
=> [1, 2]

Mike Dvorkin
http://www.rubywizards.com