* 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
This commit is contained in:
akr 2008-09-30 15:21:30 +00:00
parent 888072261f
commit 252255cad4
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Wed Oct 1 00:20:38 2008 Tanaka Akira <akr@fsij.org>
* process.c (check_exec_redirect): don't depend on rb_stdout and
rb_stderr.
Tue Sep 30 23:06:58 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* test/mini/test_mini_test.rb: removed.

View File

@ -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);