From: "Andrew S." Date: 2012-08-13T07:25:43+09:00 Subject: Re: What should I use instead of Generator in 1.9? Thanks!! How do I implement the equivalent of generator's .next? method in order to avoid the following... irb(main):001:0> @foo = (1..10).each => # irb(main):002:0> while true irb(main):003:1> puts @foo.next irb(main):004:1> end 1 2 3 4 5 6 7 8 9 10 StopIteration: iteration reached an end from (irb):3:in `next' from (irb):3 from /usr/local/bin/irb:12:in `
' irb(main):005:0> -- Posted via http://www.ruby-forum.com/.