I have an array of ~1200 ruby objects and I want to loop over them and delete the ones with names that contain words or parts of words.
So I tried this:
There is another way to do the same as reject! with delete:
reject!
delete
list.delete_if { |item| item =~ /cat|dog|rat/i }