A Set 1 is a useful collection and something I under-utilize in Ruby. A Set does not allow duplicates. Converting between a Set and an Array is easy. In the article A Guide to Ruby Collections, II: Hashes, Sets, and Ranges [^sitepoint] the author has listed some nice examples where Sets are useful.
ruby-doc Set [^setbetter]: When Is a Set Better Than an Array in Ruby? [^setarray]: Array Set Operations in Ruby [^sitepoint]: A Guide to Ruby Collections, II: Hashes, Sets, and Ranges↩