summaryrefslogtreecommitdiffstats
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
commit31c04c97496529fc91cc060438d3b18ea9ab4294 (patch)
tree86a2facb8965bff645bf33f4fb4fcb7bff6ab555
parent36e63194304ca32179cca3277bae535cf9dd820d (diff)
downloadruby-31c04c97496529fc91cc060438d3b18ea9ab4294.tar.gz
ruby-31c04c97496529fc91cc060438d3b18ea9ab4294.tar.xz
ruby-31c04c97496529fc91cc060438d3b18ea9ab4294.zip
commit miss
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 2db69b939..137759505 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)