On Wed, Dec 12, 2012 at 7:11 PM, Bartosz Dziewoński wrote:
> Jan, Robert, yes, but that's not the point.
>
> The same happens with a StringIO:
>
> irb(main):010:0> require 'stringio'
> => true
> irb(main):014:0> io = StringIO.new "a\nb\nc\nd\ne"
> => #
> irb(main):015:0> [1].zip(io.each){|a,b| p a
On Wed, Dec 12, 2012 at 12:51 PM, 林彰史 wrote:
> Yes I agree that it makes no sense, but I wanted to see how zip method works
> with File IO with a simple experimental code.
> My point is why the second line of input is discarded.
That might be an artifact of unhealthy using of the Enumerator becau