what about 

filehandler = IO.popen(your_command, "r+")
the + sign does the trick for me. I write data i.e. to the circuit
simulator spice (your_command="spice3 -b 2>&1") and 

after evaluation of

filehandler.close_write

i gather the results with

filehandler.readline

For me it was hard for me to find the "r+" piece btw. I stumbled 
over it with 

ri IO#close_write

Maybe a snippet for ruby cookbook? 

PTY-Module was overkill for my purpose. One has to massage the pty by
invoking "stty -echo" and so on. The example applications all worked.

-- 
Fritz Heinrichmeyer mailto:fritz.heinrichmeyer / fernuni-hagen.de
FernUniversitaet Hagen, LG ES, 58084 Hagen (Germany)
tel:+49 2331/987-1166 fax:987-355 http://www-es.fernuni-hagen.de/~jfh