Possible Duplicate:
Remove from the array elements that are repeated. in Ruby
I would like to do this:
my_array = [1, 1, 2, 2, 3]
my_array_without_duplicates = [3]
calling my_array.uniq will give me [1, 2, 3], which is not the result I want. Is there an efficient way of doing this? What I am doing right now is too ugly to post.
or
BTW, you probably meant
my_array = [1, 1, 2, 2, 3](with brackets, not braces).