From: "Földes László" Date: 2012-05-08T17:26:37+09:00 Subject: Re: Why Enumerator#next does not return more than one value? Sebastian Hungerecker wrote in post #1059935: > On 07.05.2012 23:24, Földes László wrote: >> Both #each_slice and #each_cons try to build an Array from the >> enumerator, which is - in this case - impossible, because the Enumerator >> is infinite and would eat up all the memory. > > That's not true. Both each_slice and each_cons return enumerators > (or yield directly to the block when given one) and it's perfectly > possible to use them with infinite sequences. True! Don't know why I thought the opposite. Thank you, this solved my problem. -- Posted via http://www.ruby-forum.com/.