2007/8/17, Josselin <josselin / wanadoo.fr>:
> I have an array    anArray = [ object_1, object_2, ......  object_n]
>
> I would like to delete an object in it,    if object.attribute_x = anInteger
>
> what is the dryest way to do it vs a C-style loop on each item of the array ?

irb(main):001:0> %w{foo bar peter mountain}.delete_if {|s| s.length > 3}
=> ["foo", "bar"]

robert