Backport #2168
closedFile.eof? does not work correctly
Description
=begin
C:>echo test > c:\eof.txt
C:>ruby19\bin\irb
irb(main):001:0> File.open 'c:/eof.txt', 'r' do |f|
irb(main):002:1* while !f.eof? do
irb(main):003:2* p f.readline
irb(main):004:2> end
irb(main):005:1> end
"test \n"
EOFError: end of file reached
from (irb):3:in readline' from (irb):3:in
block in irb_binding'
from (irb):1:in open' from (irb):1 from C:/Amberg/A_ATOFFICE/GRPOffice2/DeployRelease/Ruby/bin/irb:12:in
'
irb(main):006:0>
=end
Updated by usa (Usaku NAKAMURA) over 14 years ago
- Target version set to 2.0.0
=begin
it seems to be a problem of text mode.
open with 'rb', no problem.
open with 'rt', EOFError occurs.
=end
Updated by akr (Akira Tanaka) over 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r25883.
Vit, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by usa (Usaku NAKAMURA) over 14 years ago
- Status changed from Closed to Assigned
- Assignee set to yugui (Yuki Sonoda)
=begin
=end
Updated by yugui (Yuki Sonoda) over 14 years ago
- Status changed from Assigned to Closed
=begin
This issue was solved with changeset r26015.
Vit, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end