Found table http://phrogz.net/programmingruby/language.html#table_18.4 but unable to find description for |=
|=
How the |= assignment operator works?
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]
2.1m questions
2.1m answers
60 comments
57.0k users