Hello,

The following example seems not to work under Windows:

=3Dbegin
r, w =3D IO.pipe

w.write "awesome" * 10

puts r.read_nonblock(8)

r.close
w.close
=3Dend

C:\Users\Luis>ruby -v t.rb
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
t.rb:5:in `read_nonblock': Bad file descriptor (Errno::EBADF)
        from t.rb:5:in `<main>'

What is not clear is that using StringIO works:

=3Dbegin
require "stringio"

b =3D StringIO.new

b.write "awesome" * 10
b.rewind

puts b.read_nonblock(8)

b.close
=3Dend

C:\Users\Luis>ruby -v t2.rb
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
awesomea

Perhaps pipes are not open properly? Is this supported under Windows?

Thank you.
--=20
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exup=E9ry