From: Love U Ruby Date: 2013-05-22T02:25:58+09:00 Subject: Re: Enum#each issue Hans Mackowiak wrote in post #1109748: > because the block is similar to a e.feed(function(e.next)) > > and you do not call the feed, without ruby does not know wich value it > should set for the element Okay! understood. enum#feed says - "Sets the value to be returned by the next yield inside e." Now in my below example, why the feeded value comes after the second `next` call? >> def meth >> [1,2,3].each {|e| p yield(e)} >> end => nil >> ?> m = to_enum(:meth) => # >> m.feed "foo" => nil >> m.next => 1 >> ?> ^C >> m.next "foo" => 2 -- Posted via http://www.ruby-forum.com/.