diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-11 17:25:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-11 17:25:57 +0000 |
commit | 1d09b69f62d1f779f4f446a743036b6fe8c5d59a (patch) | |
tree | 47db064ab69163c62130850e7c228d8377509b92 /io.c | |
parent | cf508bfedad6613d69b1d784a3a804538eae55d0 (diff) | |
download | ruby-1d09b69f62d1f779f4f446a743036b6fe8c5d59a.tar.gz |
* io.c (rb_io_reopen): clear read buffer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4463,6 +4463,7 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file) if (fptr->mode & FMODE_WRITABLE) { io_fflush(fptr); } + fptr->rbuf_off = fptr->rbuf_len = 0; if (fptr->stdio_file) { if (freopen(fptr->path, mode, fptr->stdio_file) == 0) { |