Hi all,

Windows XP Pro
Ruby 1.8.2

The following snippet dies on Windows with:

subtest.rb:8:in `write': not opened for writing (IOError)
from subtest.rb:8:in `write_stuff'
from subtest.rb:14

Works fine on *nix.  Am I doing something wrong?  Or is this a bug?

# subtest.rb
class MyIO < IO
   def initialize(arg)      
      super(arg)
      binmode    
   end
   
   def write_stuff
      write("Hello World")
   end
end

mio = MyIO.new(File.open("test.txt","wb+").fileno)
mio.write_stuff
mio.close
puts "Done"

Regards,

Dan