On Wed, Dec 12, 2012 at 7:11 PM, Bartosz DziewoƄski <[email protected]> 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"
> => #<StringIO:0x10aee00>
> 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/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to