From: "Jan E." Date: 2012-05-15T02:38:41+09:00 Subject: Re: Understanding Enumerator's yielder Hi, Földes László wrote in post #1060708: > I found a good (and simple) example of Enumerators (Ruby 1.9) in the > pickaxe book, the triangular_numbers from which I devised a simpler > (although rather useless) example: > > m = Enumerator.new { |yielder| loop {yielder.yield 1 } } > > I faithfully copied that 'yielder' parameter but to be honest I don't > understand where it is defined. Is it possible to modify it? Modify what? The block parameter contains an instance of Enumerator::Yielder, which is used to pass control around. -- Posted via http://www.ruby-forum.com/.