aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
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 3e3a0ed448..e4d9f3c4ec 100644
--- a/io.c
+++ b/io.c
@@ -7275,7 +7275,7 @@ io_reopen(VALUE io, VALUE nfile)
rb_sys_fail(0);
}
else {
- io_tell(fptr);
+ flush_before_seek(fptr);
}
if (orig->mode & FMODE_READABLE) {
pos = io_tell(orig);