From: Robert Klemme Date: 2012-12-13T04:55:04+09:00 Subject: Re: Enumerable#zip with File IO 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,b } > 1 > "a\n" > => nil > irb(main):016:0> io.read > => "c\nd\ne" > > I suggest you report a bug on http://bugs.ruby-lang.org/, as this > doesn't look like the correct behavior. I won't do that because first it's an abuse of #zip and second I am not convinced yet that the behavior is caused by the way streams work. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/