diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-13 09:21:14 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-13 09:21:14 +0000 |
commit | fbc4429d727161c2e002863d2f9ab2cb823941d2 (patch) | |
tree | d43260fbba7d978d96af3f7c779d7a8bbab3e3d4 /io.c | |
parent | e668e36b49b38d6d422c6e9d4b3eddd374bcbb15 (diff) | |
download | ruby-fbc4429d727161c2e002863d2f9ab2cb823941d2.tar.gz |
* io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686]
(also see [ruby-dev:37721])
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5963,6 +5963,12 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io) fp->encs = convconfig; clear_codeconv(fp); io_check_tty(fp); + if (fileno(stdin) == fd) + fp->stdio_file = stdin; + else if (fileno(stdout) == fd) + fp->stdio_file = stdout; + else if (fileno(stderr) == fd) + fp->stdio_file = stderr; return io; } |