Issue #1081 has been updated by Roger Pack.

File latest.diff added

Sorry for the poor tests.
Fixing the tests revealed that there were some bugs in binwrite.

The attached (new) patch fixes the tests and code.  The tests pass on windows and linux (and I think are accurate).
Feel free to refactor it as desired.

(as a note, windows currently fails some other tests in test_io.rb http://gist.github.com/383867).

Thanks.
-rp
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1081

----------------------------------------
http://redmine.ruby-lang.org