Forum: Ruby IO#read mode on Windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7a8de827ec9031e43ecb1e97ab34461d?d=identicon&s=25 Alex Y. (regularfry)
on 2006-06-13 00:54
(Received via mailing list)
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?
This topic is locked and can not be replied to.