Issue #6271 has been updated by nobu (Nobuyoshi Nakada).

Category set to core
Status changed from Open to Assigned
Assignee set to h.shirosaki (Hiroshi Shirosaki)
Target version changed from 1.9.3 to 2.0.0


----------------------------------------
Bug #6271: textmode File#read on CRLF
https://bugs.ruby-lang.org/issues/6271#change-25745

Author: riskwa (riskwa anon)
Status: Assigned
Priority: Normal
Assignee: h.shirosaki (Hiroshi Shirosaki)
Category: core
Target version: 2.0.0
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/