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 aa3fc5536c..593e1facc2 100644
--- a/io.c
+++ b/io.c
@@ -243,7 +243,7 @@ rb_io_check_writable(fptr)
rb_raise(rb_eIOError, "not opened for writing");
}
#if NEED_IO_SEEK_BETWEEN_RW
- if ((fptr->mode & FMODE_RBUF) && !fptr->f2) {
+ if ((fptr->mode & FMODE_RBUF) && !feof(fptr->f) && !fptr->f2) {
io_seek(fptr, 0, SEEK_CUR);
}
#endif