Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby |=

# When working with arrays |= is useful for uniquely appending to an array.
>> x = [1,2,3]
>> y = [3,4,5]

>> x |= y
>> x
=> [1, 2, 3, 4, 5]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ruby
ADD COMMENT
Topic
Name
4+8 =