From: Michel Demazure Date: 2010-05-01T17:20:50+09:00 Subject: Re: File.read(fname) vs. File.read(fname,File.size(fname)) Alex Dowad wrote: > Thanks for your reply, Roger! > >> I'm unable to reproduce this except on windows, so that's where you are, >> I assume? > > Yes. Sorry, I'll make that clear next time I post. > In my case, on Windows with 1.9.1 and an utf-8 file, the two commands are not equivalent. Replacing File.read(file) by File.read(file, File.size(file)) raises encoding errors. They behave differently wrt encodings. -- Posted via http://www.ruby-forum.com/.