JFYI, Set could be useful: http://ruby-doc.org/stdlib-2.0.0/libdoc/set/rdoc/Set.html