diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 8 |
2 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Tue Aug 19 11:19:33 2003 Shugo Maeda <shugo@ruby-lang.org> + + * io.c (next_argv): should not call GetOpenFile() if rb_stdout is + not a IO (T_FILE). + Tue Aug 19 07:47:09 2003 GOTOU Yuuzou <gotoyuzo@notwork.org> * ext/openssl/ossl_ssl.c: sync_close is moved to SSLSocket as @@ -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) { |