From: "comp.lang.ruby" Date: 2010-01-12T07:05:05+09:00 Subject: Re: redirecting output ruby and from stdout results in blank file On Jan 11, 1:27 pm, Iņaki Baz Castillo wrote: > El Lunes, 11 de Enero de 2010, Jonathan Nielsen escribiķ: > > It's possible that I'm misinterpreting what you want here, but you may > > want to look into the function popen3: > > >http://ruby-doc.org/stdlib/libdoc/open3/rdoc/index.html > > > It let's you specify what to do with the stdin, stdout, and stderr streams. > > I recommend popen4 as it also gets the correct exit status code of the > executed command. > > -- > Iņaki Baz Castillo Thanks a lot for the suggestion. However, std_error is redirecting fine and I have noticed that when I omit the redirection characters in the open command, the ouput is outputted to stdout, as I expect. I am happy to switch to popen if that's the only solution -- I just find this to be really weird behavior. Any guesses about why this happened?