From: Logan Capaldo Date: 2006-06-29T13:49:41+09:00 Subject: Re: Changes to x within x.each() On Jun 28, 2006, at 11:20 PM, Jim V. Tess wrote: > Does Ruby have defined behavior for 'each' in the following: > > x.each do |obj| > ... > x.change() # This may add or remove objects from x > end > > Cases: > 1) Adding or removing objects 'before' obj. > 2) Adding or removing objects 'after' obj. > > I'm primarily interested when x is an array. > > -- > Posted via http://www.ruby-forum.com/. > As far as I know theres not explicitly defined behavior, but I believe 2) works as you might expect.