petdance/scratch — Issue #178: .eof returns false if last read call read the last byte of the file, but not beyond
Author: petdance
Created: 2011-11-14 05:55:09+00:00
State: open
Labels: core, Pri-normal, rfc, Sev-medium

Hi,
It seems that the .eof() method on file handles can sometimes return
true even if there is nothing more to read. This occurs when you have
read upto the last byte of a file (e.g. when a readline reads up to the
end of a newline, and that newline is the last thing in the file), but
not beyond (which seems to be what causes the EOF flag to be set). I'm
thinking this is the wrong behaviour?

Thoughts and fixes welcome!

Jonathan

Originally http://trac.parrot.org/parrot/ticket/1212