diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-19 02:21:04 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-19 02:21:04 +0000 |
commit | 90e010abb9efeaaf706c363af31beedf65c8be3b (patch) | |
tree | 9c27010b4db2ab1cf10a6a253f439cbf669e1768 /io.c | |
parent | ba64282cdc2e02a742ae5e0159d606051f188aa5 (diff) |
* io.c (next_argv): should not call GetOpenFile() if rb_stdout is
not a IO (T_FILE).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2963,9 +2963,11 @@ next_argv() OpenFile *fptr; int stdout_binmode = 0; - GetOpenFile(rb_stdout, fptr); - if (fptr->mode & FMODE_BINMODE) - stdout_binmode = 1; + if (TYPE(rb_stdout) == T_FILE) { + GetOpenFile(rb_stdout, fptr); + if (fptr->mode & FMODE_BINMODE) + stdout_binmode = 1; + } if (init_p == 0) { if (RARRAY(rb_argv)->len > 0) { |