ruby create uniq method code example Example: ruby uniq a = [ "a", "a", "b", "b", "c" ] a.uniq # => ["a", "b", "c"]