class Array
def excluding(*elements)
Note: This is an optimization of Enumerable#excluding that uses Array#-
[ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ]
["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"]
Returns a copy of the Array excluding the specified elements.
def excluding(*elements) self - elements.flatten(1) end