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 | 32c38881280a40bb48f2f3688bb8bc7c7ad11115 (patch) | |
| tree | d43260fbba7d978d96af3f7c779d7a8bbab3e3d4 | |
| parent | 71e738d9b9afb5122a48e209af9ec5df2e791baa (diff) | |
| download | ruby-32c38881280a40bb48f2f3688bb8bc7c7ad11115.tar.gz ruby-32c38881280a40bb48f2f3688bb8bc7c7ad11115.tar.xz ruby-32c38881280a40bb48f2f3688bb8bc7c7ad11115.zip | |
* io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686]
(also see [ruby-dev:37721])
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | io.c | 6 |
2 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Jan 13 18:19:49 2009 NAKAMURA Usaku <usa@ruby-lang.org> + + * io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686] + (also see [ruby-dev:37721]) + Tue Jan 13 17:29:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * enc/trans/make_transdb.rb (converters): should not depend on the @@ -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; } |
