Forum: Ruby is this a bug?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Roger P. (Guest)
on 2008-11-08 04:30
works in linux...



>> a= Tempfile.new 'a'
=> #<File:C:/DOCUME~1/RANDOM~1/LOCALS~1/Temp/a20081107-940-1dev029-0>
>> a.write_nonblock 'yoyo'
Errno::EBADF: Bad file descriptor -
C:/DOCUME~1/RANDOM~1/LOCALS~1/Temp/a20081107-940-1dev029-0
        from (irb):5
        from c:/installs/ruby_snapshot/bin/irb.bat:20:in `<main>'

?
Thanks!
-=R
Roger P. (Guest)
on 2008-11-11 08:33
> Errno::EBADF: Bad file descriptor -
> C:/DOCUME~1/RANDOM~1/LOCALS~1/Temp/a20081107-940-1dev029-0
>         from (irb):5
>         from c:/installs/ruby_snapshot/bin/irb.bat:20:in `<main>'

To answer my own question, turns out that file descriptors don't "do"
blocking in windows--only socket descriptors do. Go figure.
-=R
This topic is locked and can not be replied to.