RichardOnRails wrote:
> array.compact.reject { |i| i.nil? or i.empty? } seemed to leave some
> unwanted elements, at least on my Ruby 1.8.6.
> 
> But array.delete_if { |i| i.nil? or i.empty? } worked as expected on
> my machine.
> 
> HTH,
> Richard
> 
> 
> array.delete_if { |i| i.nil? or i.empty? }

My Ruby version is 1.8.7
But the more important is the problem solved. =P
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to