Help understanding an error on Windows

In this PR I attempted to fix a few things in YAML.jl. I succeeded in fixing them for Linux, but it looks like I broke something for Windows in the process. It looks to me like eof behaves differently on Windows, but I don’t have a machine to test on so I can’t tell for sure what has gone wrong. I would appreciate any advice about how to fix the failing test cases.