array = array.uniq
uniq removes all duplicate elements and retains all unique elements in the array.
This is one of many beauties of the Ruby language.
array = array.uniq
uniq removes all duplicate elements and retains all unique elements in the array.
This is one of many beauties of the Ruby language.