If only there was IO#binmode=...

Binary mode can be set only when opening file. IO#binmode reports IO
stream status.

irb(main):001:0> f=File.new('test', 'w')
=> #<File:test>
irb(main):002:0> f.binmode=true
NoMethodError: undefined method `binmode=' for #<File:test>
        from (irb):2

Tobias Peters wrote:
> > 1. Tempfile is not useful for working with binary data on Windows
>
> Tempfile#binmode should solve that problem.


I forgot to mention that I use ruby 1.8.2 i386-mswin32 (One-Click
Installer, v. 1.8.2-14 Final)

--
Best regards
RNicz