Please use MRI as reference for the error messages. This should be `raise EOFError, "end of file reached"` only if we're at the end of the stream. If it's closed, you should raise `IOError, "closed stream"`