Tim Hunter wrote:
> jackster the jackle wrote:
>>        puts range
>>      end
>>   end
>> 
>> Is this the correct way to delete matched entries from an array?
>> 
>> Thanks
>> 
>> John
> 
> Use delete_if instead.

Or Array#reject!

deleting while iterating with each is undefined behavior. It's like 
sawing off the tree branch you are sitting on.
-- 
Posted via http://www.ruby-forum.com/.