1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

commit miss

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-05-21 17:49:18 +00:00
parent d547df4c53
commit 63a5a45a01

2
io.c
View file

@ -2371,7 +2371,7 @@ io_reopen(io, nfile)
mode = rb_io_mode_string(fptr);
fd = fileno(fptr->f);
if (fd == fileno(stdin) || fd == fileno(stdout) || fd == fileno(stderr)) {
if (fptr->f == stdin || fptr->f == stdout || fptr->f == stderr) {
clearerr(fptr->f);
/* need to keep stdio objects */
if (dup2(fileno(orig->f), fd) < 0)