From: "Berger, Daniel" Date: 2006-02-22T05:44:07+09:00 Subject: Re: system() help > -----Original Message----- > From: matt.smillie@gmail.com [mailto:matt.smillie@gmail.com] > Sent: Tuesday, February 21, 2006 1:39 PM > To: ruby-talk ML > Subject: Re: system() help > > > Look up 'open3' in the standard library: > http://ruby-doc.org/stdlib/libdoc/open3/rdoc/index.html > > require "open3" > stdin, stdout, stderr = Open3.popen3('man ruby') > > (You don't have to use stdin if you don't want to) Use the block form. :) Open3.popen3('man ruby'){ |stdin, stdout, stderr| ... } Closes the blocks automatically for you. Regards, Dan