aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
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 a2dca1a4a0..9f6631dfbf 100644
--- a/io.c
+++ b/io.c
@@ -1799,6 +1799,7 @@ io_reopen(io, nfile)
fptr->f = rb_fdopen(fd, mode);
if (orig->mode & FMODE_READABLE && pos >= 0) {
fseek(fptr->f, pos, SEEK_SET);
+ fseek(orig->f, pos, SEEK_SET);
}
}