aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io.c b/io.c
index 9720145fc1..b1d985e4f5 100644
--- a/io.c
+++ b/io.c
@@ -5648,6 +5648,9 @@ io_reopen(VALUE io, VALUE nfile)
if (io_fflush(fptr) < 0)
rb_sys_fail(0);
}
+ else {
+ io_tell(fptr);
+ }
/* copy rb_io_t structure */
fptr->mode = orig->mode | (fptr->mode & FMODE_PREP);