B
Berger, Daniel
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) =20
super(arg)
binmode =20
end
=20
def write_stuff
write("Hello World")
end
end
mio =3D MyIO.new(File.open("test.txt","wb+").fileno)
mio.write_stuff
mio.close
puts "Done"
Regards,
Dan
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) =20
super(arg)
binmode =20
end
=20
def write_stuff
write("Hello World")
end
end
mio =3D MyIO.new(File.open("test.txt","wb+").fileno)
mio.write_stuff
mio.close
puts "Done"
Regards,
Dan