[#41916] Proposal: Bitmap Marking GC — Narihiro Nakamura <authornari@...>

Hi.

18 messages 2012/01/05

[#41941] [ruby-trunk - Bug #5851][Open] make check fails when compiling with GCC 4.7 - *** longjmp causes uninitialized stack frame *** — Vit Ondruch <v.ondruch@...>

12 messages 2012/01/06

[#41979] [ruby-trunk - Bug #5865][Open] Exception#== should return false if the classes differ — Hiro Asari <asari.ruby@...>

10 messages 2012/01/08

[#42003] [ruby-trunk - Bug #5871][Open] regexp \W matches some word characters when inside a case-insensitive character class — Gareth Adams <gareth@...>

14 messages 2012/01/09

[#42016] [ruby-trunk - Feature #5873][Open] Adopt FFI over DL — Heesob Park <phasis@...>

15 messages 2012/01/10

[#42149] [ruby-trunk - Feature #5899][Open] chaining comparsions. — Ondrej Bilka <neleai@...>

12 messages 2012/01/16

[#42164] [ruby-trunk - Feature #5903][Open] Optimize st_table (take 2) — Yura Sokolov <funny.falcon@...>

18 messages 2012/01/17

[ruby-core:42103] IO.pipe, read_nonblock and Windows

From: Luis Lavena <luislavena@...>
Date: 2012-01-13 00:17:07 UTC
List: ruby-core #42103
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

In This Thread

Prev Next