Hi,

In message "Problem with binary files in mswin ruby"
    on 04/03/30, haldane <jbshaldane / hotmail.com> writes:

|The conclusion is that an IO stream cannot sucessfully be changed to
|binary mode after it has been tested for EOF (unless reset first with
|rewind).
|
|Is this expected behaviour?

eof? operation fills the internal stdio buffer before binary mode is
turned on.  In that case, turning on the flag is too late.

							matz.