From: KOSAKI Motohiro Date: 2011-08-28T14:55:15+09:00 Subject: [ruby-core:39157] Re: [Ruby 1.9 - Bug #5237] IO.copy_stream calls #read on an object infinitely many times >> The class that implements an IO#read-like method without clearing >> the destination buffer on EOF is arguably broken, but infinite >> looping is bad, I think. > > Ah, you are right, it really should replace buffer with "" (according > to the code) and return nil according to the docs. Seems more than a > little weird, however, to empty the buffer to signal EOF, especially > since the buffer argument is optional. I'm curious. Which doc do you talk about?