RosettaCodeData/Task/Remove-duplicate-elements/Ruby/remove-duplicate-elements-1.rb
2015-02-20 00:35:01 -05:00

2 lines
116 B
Ruby

ary = [1,1,2,1,'redundant',[1,2,3],[1,2,3],'redundant']
p ary.uniq # => [1, 2, "redundant", [1, 2, 3]]