From: Greg Ma Date: 2010-02-15T14:48:54+09:00 Subject: Re: Compare and delete element from an array > Note that the first version with a "puts" at the end of the delete_if > block failed to remove element "two", but reordering the operation in > the second version worked. > Even if i remove the puts, it still doesnt remove anything. def remove_tags(array_of_tags) if !array_of_tags.empty? array_of_tags.each do |tag| tags.delete_if { |x| x.name == tag } end end end -- Posted via http://www.ruby-forum.com/.