From: evanm@... Date: 2004-06-21T22:02:32+09:00 Subject: Re: Cleaning up IO#popen Hey, On Mon, Jun 21, 2004 at 11:34:53AM +0900, nobu.nokada@softhome.net wrote: > Hi, > > At Mon, 21 Jun 2004 06:06:02 +0900, > evanm@frap.net wrote in [ruby-talk:104194]: > > > > I think IO#popen could stand to be changed, and I wanted to run my ideas by > > this list. Currently the problems with popen are: > > > > * can't bypass the shell > > In 1.9, it can as well as Kernel#system. Really? I went and grabbed ruby-1.9-rodc-20040114.tgz to check it out, and the docs say it's the same. Is there a better place to find this information? Is the mode argument gone? Is the magic "-" value gone? > > > While looking around for ways to improve on it I came across the Open3 > > module in the stdlib, which has a much more "ruby" interface. Based mostly on > > that, I redid some methods that could replace IO.popen (and put popen3 in IO > > at the same time, which is where it probably belongs) > > I don't feel that Open3 is more ruby-like, but it's rather > perlish. To me, magic values in a string are hackish. popen('-') logically is and should be an entirely separate function. I can't really comment on the new version of popen that you're referencing as I can't find any information on it. How does it work? What is its args? Does it drop the '-' and mode arguments?