mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
e668e36b49
commit
fbc4429d72
2 changed files with 11 additions and 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
|
||||
|
|
6
io.c
6
io.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue