Simon Schuster wrote:
> 077:0> array = File.read("/text.txt").to_a.each { |x| x.chomp! }
> 080:0> array.each_with_index { |x,y|
>     array.delete_at(y) if x.empty? == true
> }
> 
> still leaves me with plenty of empty array items
> 080:0> array[-3]
> ""

You are modifying the array itself while iterating through it. I haven't
checked specifically how it behaves in your specific case, but this
approach in general needs special attention to have it right in all cases.

I guess you sould check out *#reject instead...

mortee