On Apr 14, 12:16 pm, Vincent Angeloni <nospam7... / mac.com> wrote:
>
> Ah, yes. I knew it was something simple.
> I'll just sort countarray so that the highest index value is first, and
> perhaps that will take care of the problem!
> Thank you.

Another approach would be: instead of deleting each item, put nil at
each specified array index. Then, after you're done iterating, delete
all the nils using Array#compact!, like so:

sizeList = [0,1,2,3,4,5,6]
countarray = [3,4,6]
countarray.each {|x| sizeList[x] = nil}
sizeList.compact!