summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-21 17:49:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-21 17:49:18 +0000
commit63a5a45a01b656adbc0457036a0f575b847b2a08 (patch)
tree86a2facb8965bff645bf33f4fb4fcb7bff6ab555 /io.c
parentd547df4c537226112777086f52bc23f39eadb0e7 (diff)
commit miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 2db69b939e4..13775950507 100644
--- a/io.c
+++ b/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)