Set/Concat Array and remove duplicates
query = ['dog', 'cat', 'mustache']
words =['mustache', 'mushroom', 'fellini']
query |= words
puts query
#['mustache', 'mushroom', 'fellini', 'dog', 'cat']
Written by george
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#