Project

General

Profile

Actions

Backport #2168

closed

File.eof? does not work correctly

Added by vo.x (Vit Ondruch) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
[ruby-core:25881]

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


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #2380: IO#eof? behavior different with 1.9.1p243-mingw32 than other platformsClosed11/18/2009Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0