Project

General

Profile

This project is closed and read-only.

Actions

Backport #2168

closed

File.eof? does not work correctly

Backport #2168: File.eof? does not work correctly

Added by vo.x (Vit Ondruch) about 17 years ago. Updated over 15 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 open — 1 closed)

Has duplicate Ruby - Bug #2380: IO#eof? behavior different with 1.9.1p243-mingw32 than other platformsClosedActions
Actions

Also available in: PDF Atom