summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-10 15:13:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-10 15:13:07 +0000
commit0ed07fb1251aa878aad0073b25bb02f080975bb0 (patch)
treea26884e4324024cd7a760b633fa1a993fef8ff9c /io.c
parent5e10aeb3b8953609a8f2046f3ff40cb70ad2afb4 (diff)
* io.c (io_reopen): [ruby-dev:25150]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 1e77e5b..ec16438 100644
--- a/io.c
+++ b/io.c
@@ -3172,6 +3172,7 @@ io_reopen(io, nfile)
}
else {
fclose(fptr->f);
+ fptr->f = NULL;
if (dup2(fd2, fd) < 0)
rb_sys_fail(orig->path);
fptr->f = rb_fdopen(fd, mode);