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:
parent
d547df4c53
commit
63a5a45a01
1 changed files with 1 additions and 1 deletions
2
io.c
2
io.c
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue