Whenever eof is reach in a port, a call to unread-char passing eof triggers an error. I'm not sure what's the right behavior for this, but I guess the way it is now is just as the user should be responsible to check eof.
A note in the documentation would help in any case.
