Contents

Roo

Array.unique

Returns a new Array object by removing duplicate values from this array. Text, Number, Boolean and Nothing objects are considered identical if they have the same value. Other objects are only considered identical if they actually point to the same object in memory. This Array object is unaltered by the operation.

var a = ["a", "a", "b", "b", "c"]
a.unique # => ["a", "b", "c"]