From: Matt Gushee Date: 2002-10-03T14:44:54+09:00 Subject: Re: Can soneone tell me what I'm doing wrong... On Thu, Oct 03, 2002 at 02:21:32PM +0900, Bulat Ziganshin wrote: > > use a concept of index :) when we delete element currently indexed by > iterator, this index will point to next element and when we increment > that index, we will just skip one element totally > > WDT> Well, I don't know how to explain it easily without using the concept of > WDT> pointer. For the expert Ruby programmers, can someone help here? > > >>> > If you ever used C++, then you would have known the issue of deleting an > >>> > element while you are traversing the container using an iterator. Well, that's simple enough. I was expecting something more esoteric. So does this mean that at the implementation level there's really no difference between stuff.each and for (int i = 0; i < stuff.length(); i++) { ? -- Matt Gushee Englewood, Colorado, USA mgushee@havenrock.com http://www.havenrock.com/