From: Logan Capaldo Date: 2004-12-14T05:27:03+09:00 Subject: Re: ming-ruby question On Mon, 13 Dec 2004 21:22:19 +0900, George Moschovitis wrote: > Hello everyone, > > I would like to capture of Ming-Ruby in a Ruby String/StringIO. > I tried the following w/o success: > > tmp = $stdout > flash = $stdout = StringIO.new > m.output > $stdout = tmp > > The low level C output methods doesnt understand about > $stdout and keeps dumping bytes to the standard output. > Any ideas? > > Thanks in advance for any help. > George. > > -- > www.navel.gr | tel: +30 2106898050 | fax: +30 2106898437 > > web appliction engine: http://www.navel.gr/nitro > have fun: http://www.joy.gr > > Well this idea is a hack obviously but have you tried: # mingout.rb ... ming.output # mingin.rb m = IO::popen("mingout.rb") data = m.read The massive downside to this is that it requires two programs, and I am sure there is a better way, but it should work