Problem using IO.popen under windows

hello,
I use my ruby program to dialog with an external program using IO.popen.
under linux it works well.
but under windows, I get this error (that I reproduce with an example
code)

gg=IO.popen(‘date’,‘r+’)
p gg.gets

result:

Y:\jef\go>testio.rb
“La date du jour est\377: mar. 25/02/2003 \n”
Y:\jef\go\testio.rb:2: Invalid file pointer passed to mypclose! (fatal)

Y:\jef\go\testio.rb:2: [BUG] Segmentation fault
ruby 1.6.7 (2002-03-01) [i586-mswin32]

abnormal program termination

Y:\jef\go>

am I doing something wrong ?
thx,
jf

···


/ do you play Go? \

http://jeanfrancois.menon.free.fr/rubygo |
\ /


    \   ^__^
     \  (oo)\_______
        (__)\       )\/\
            >>----w |
            >>     >>

Hi,

···

At Tue, 25 Feb 2003 11:51:34 +0900, MENON Jean-Francois wrote:

gg=IO.popen(‘date’,‘r+’)
p gg.gets

result:

Y:\jef\go>testio.rb
“La date du jour est\377: mar. 25/02/2003 \n”
Y:\jef\go\testio.rb:2: Invalid file pointer passed to mypclose! (fatal)

Two-way pipe on Windows has been supported since 1.7.2
2002/06/29.


Nobu Nakada