Skip to content

Commit

Permalink
io.c (rb_io_check_writable): don't call io_seek if EOF flag is set,
Browse files Browse the repository at this point in the history
to avoid clearing EOF flag.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
akr committed Dec 9, 2003
1 parent 39e04f4 commit 231f7cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Tue Dec 9 12:49:22 2003 Tanaka Akira <[email protected]>
Tue Dec 9 14:10:48 2003 Tanaka Akira <[email protected]>

* 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 <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 231f7cb

Please sign in to comment.