delete_if()
public
Deletes every key-value pair from hsh for which block
evaluates to true.
If no block is given, an enumerator is returned instead.
h = { "a" => 100, "b" => 200, "c" => 300 }
h.delete_if {|key, value| key >= "b" }
Show source
VALUE
rb_hash_delete_if(VALUE hash)
{
RETURN_ENUMERATOR(hash, 0, 0);
rb_hash_modify(hash);
rb_hash_foreach(hash, delete_if_i, hash);
return hash;
}