From: Ragav Satish Date: 2008-10-04T09:41:57+09:00 Subject: Re: Iterate through array and delete if match 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/.