From: "riskwa (riskwa anon)" Date: 2012-04-09T00:52:19+09:00 Subject: [ruby-core:44194] [ruby-trunk - Bug #6271] textmode File#read on CRLF Issue #6271 has been updated by riskwa (riskwa anon). I tested the code above in some environments. (a) ruby 1.9.3p125 (2012-02-16 revision 34643) [i386-cygwin] : works fine (b) ruby 2.0.0dev (2012-04-08 trunk 35259) [i386-cygwin] : works fine (c) ruby 1.9.3p125 (2012-02-16) [i386-mingw32] : NG (d) ruby 2.0.0dev (2012-04-08) [i386-mingw32] : NG (e) ruby 2.0.0dev (2012-04-08) [i386-mingw32] (+read_eof.patch) : works fine ---------------------------------------- Bug #6271: textmode File#read on CRLF https://bugs.ruby-lang.org/issues/6271#change-25721 Author: riskwa (riskwa anon) Status: Open Priority: Normal Assignee: Category: Target version: 1.9.3 ruby -v: 1.9.3p125 (2012-02-16) [i386-mingw32] I'm not sure this is bug, when "File#read(X)" for textmode finishes inside of CRLF, stream keeps CR unread against my intuition. The following code prints "\r" forever for CRLF. File.open(__FILE__, "r") do |f| until f.eof? p f.read(1) end end -- http://bugs.ruby-lang.org/