From: "Wolfgang Nádasi-Donner" Date: 2007-12-03T16:13:02+09:00 Subject: Re: Generator#yield - what does it do? Jordan Callicoat wrote: > On Dec 2, 5:03 pm, Wolfgang N�dasi-Donner wrote: >> It's unclear for me what this means. I would expect that the Generator >> object delivers (yields) values by requirement through >> "Generator#current" or "Generator#next", but what should be yielded to >> an already existing Generator object? > It's for passing items *into* the generator's queue when the generator > is created with the block form of Generator#new rather than from an > existing enumerable. Example... I see - the confusion came from the usual meaning of yield: call a block and deliver objects to it. Here it is used from a block into a method. btw. - at least in "PickAxe" the word "yield" it marked as a reserved word. Wolfgang Nádasi-Donner -- Posted via http://www.ruby-forum.com/.