method

without

v5.2.3 - Show latest stable - Class: Array
without(*elements)
public

Returns a copy of the Array without the specified elements.

people = ["David", "Rafael", "Aaron", "Todd"]
people.without "Aaron", "Todd"
# => ["David", "Rafael"]

Note: This is an optimization of Enumerable#without that uses Array#- instead of Array#reject for performance reasons.