diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-30 15:21:30 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-30 15:21:30 +0000 |
commit | 252255cad4e813fd0d243fb4768198936d623326 (patch) | |
tree | 37d1c0d3ee27d16bbd1e0f6218da0d210fd54d3f /process.c | |
parent | 888072261f87d2dedab9d3827cf88411a1de2f10 (diff) | |
download | ruby-252255cad4e813fd0d243fb4768198936d623326.tar.gz |
* process.c (check_exec_redirect): don't depend on rb_stdout and
rb_stderr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1334,8 +1334,9 @@ check_exec_redirect(VALUE key, VALUE val, VALUE options) index = EXEC_OPTION_OPEN; path = val; FilePathValue(path); - if ((FIXNUM_P(key) && (FIX2INT(key) == 1 || FIX2INT(key) == 2)) || - key == rb_stdout || key == rb_stderr) + if (TYPE(key) == T_FILE) + key = check_exec_redirect_fd(key); + if (FIXNUM_P(key) && (FIX2INT(key) == 1 || FIX2INT(key) == 2)) flags = INT2NUM(O_WRONLY|O_CREAT|O_TRUNC); else flags = INT2NUM(O_RDONLY); |