#1212: .eof returns false if last read call read the last byte of the file, but
not beyond
----------------------+-----------------------------------------------------
Reporter: jonathan | Owner:
Type: RFC | Status: new
Priority: normal | Milestone:
Component: core | Version:
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
----------------------+-----------------------------------------------------
Comment(by cotto):
The original report from jnthn is confusing. I can see it being a
potential issue that fh.eof() returns *false* when there are 0 bytes left
in a file but a read hasn't returned fewer bytes than requested. A build
from the day the original rt was filed displays the same behavior as a
current build (modulo some api changes), so presumably that was the intent
of the ticket.
Given that, I'd like to avoid trying to secretly read and unread an extra
character if we can make fh.eof do so reliably and portably. If that's
not an option, we should document the surprising behavior and give HLLs
the tools they need to do whatever makes sense for their users.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1212#comment:7>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets