IO#read mode on Windows


#1

Hi all,

Is there any way to set the default read/write mode for IO on Windows?
I’ve just had a fairly nasty little bug come up where
File.read(‘filename’) != File.open(‘filename’, ‘rb’){|f| f.read}, so
partial files were being read.

Are there any circumstances where it makes a practical difference (from
Ruby’s point of view) which mode a file’s opened in?