ary.delete_if { |item| block } â ary
ary.delete_if â Enumerator
ary.delete_if â Enumerator
Instance Public methods
Deletes every element of self
for which block evaluates to
true
.
The array is changed instantly every time the block is called, not after the iteration is over.
See also #reject!
If no block is given, an Enumerator is returned instead.
a = [ "a", "b", "c" ] a.delete_if {|x| x >= "b" } #=> ["a"]
Please login to continue.