diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-09 05:12:52 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-09 05:12:52 +0000 |
commit | 231f7cb95ff551c4e1aa4c67d22bc36143b0ff42 (patch) | |
tree | d1249aa09c93d57223671885eb7f85663f892733 | |
parent | 39e04f4aa0a7b020c8ee28a40326299ffcdda109 (diff) | |
download | ruby-231f7cb95ff551c4e1aa4c67d22bc36143b0ff42.tar.gz |
io.c (rb_io_check_writable): don't call io_seek if EOF flag is set,
to avoid clearing EOF flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | io.c | 2 |
2 files changed, 5 insertions, 3 deletions
@@ -1,6 +1,8 @@ -Tue Dec 9 12:49:22 2003 Tanaka Akira <akr@m17n.org> +Tue Dec 9 14:10:48 2003 Tanaka Akira <akr@m17n.org> - * io.c (rb_io_check_readable): Don't clear EOF flag by io_seek. + * io.c (rb_io_check_readable): don't call io_seek if EOF flag is set, + to avoid clearing EOF flag. + (rb_io_check_writable): ditto. Tue Dec 9 02:53:55 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> @@ -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 |