From: Tanner Burson Date: 2005-10-25T07:34:04+09:00 Subject: Re: $stderr.reopen bug? On 10/24/05, nobu.nokada@softhome.net wrote: > Hi, > > At Tue, 25 Oct 2005 06:24:04 +0900, > Tanner Burson wrote in [ruby-talk:162357]: > > I tried this approach first, and it didn't seem to accomplish anything (IRB > > dump below) > > First of all, StringIO is a process internal object, so it > can't be passed to other processes. > Makes perfect sense. I wasn't aware that I was re-assigning the STDERR for all processes and not just the current Ruby process. Thanks. > unless f = IO.popen("-") > STDERR.reopen(STDOUT) > exec "nosuchcommand" > end > p f.read #=> "-e:1:in `exec': No such file or directory - nosuchcommand (Errno::ENOENT)\n\tfrom -e:1\n" > > -- > Nobu Nakada > > -- ===Tanner Burson=== tanner.burson@gmail.com http://tannerburson.com <---Might even work one day...