From: Run Paint Run Run Date: 2009-05-30T22:27:25+09:00 Subject: [ruby-core:23637] Re: Expected Behaviour of Modifying an Iterator in the Block to Which it Yields? On Sat, May 30, 2009 at 1:42 PM, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: [ruby-core:23630] Expected Behaviour of Modifying an Iterator in the Block to Which it ��Yields?" > �� ��on Sat, 30 May 2009 10:38:52 +0900, Run Paint Run Run writes: > > |While writing some specifications for RubySpec, I've encountered an issue that > |I'd appreciate clarification on: What is the expected behaviour of an iterator > |if it is modified inside of the block to which it yields? > > It is undefined behavior of iterators if the block modifies iterating > object. ��It may crash or fall in to infinite loop. Thank you, matz! That's just what I was looking for. :-) -- Run Paint Run Run