method

delete_if

Importance_2
Ruby latest stable (v1_8_7_72) - 1 note - Class: Array
delete_if() public

Deletes every element of self for which block evaluates to true.

   a = [ "a", "b", "c" ]
   a.delete_if {|x| x >= "b" }   #=> ["a"]
Show source
Register or log in to add new notes.
May 13, 2009
3 thanks

Equivalent to Array#reject!

This method is functionally identical to Array#reject!