Last Updated: February 25, 2016
·
434
· stoplion

Set/Concat Array and remove duplicates

query = ['dog', 'cat', 'mustache']

words =['mustache', 'mushroom', 'fellini']

query |= words

puts query

#['mustache', 'mushroom', 'fellini', 'dog', 'cat']