diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-16 07:00:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-16 07:00:23 +0000 |
commit | 39acf90c07686087d12f1a7a39d161a535e0e97f (patch) | |
tree | ec4c71aa968a4c9e52b246edb02bc8e1af49b324 /io.c | |
parent | 6b58f44906b6df75044dda099f28130b00149e4f (diff) | |
download | ruby-39acf90c07686087d12f1a7a39d161a535e0e97f.tar.gz ruby-39acf90c07686087d12f1a7a39d161a535e0e97f.tar.xz ruby-39acf90c07686087d12f1a7a39d161a535e0e97f.zip |
* io.c (io_reopen): discards read buffer. [ruby-core:24240]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -5648,6 +5648,9 @@ io_reopen(VALUE io, VALUE nfile) if (io_fflush(fptr) < 0) rb_sys_fail(0); } + else { + io_tell(fptr); + } /* copy rb_io_t structure */ fptr->mode = orig->mode | (fptr->mode & FMODE_PREP); |