method
without
v5.0.0.1 -
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.