From 984a73a3c7df8b13bf5a2d19dfef8a55f89c0e9c Mon Sep 17 00:00:00 2001 From: shyouhei Date: Mon, 9 Mar 2009 00:52:15 +0000 Subject: merge revision(s) 21913: * io.c (io_getpartial): fflush after read for updating pos in FILE. not portable, I guess. [ruby-core:21561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@22836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'io.c') diff --git a/io.c b/io.c index d031625ce4..257a0ea07e 100644 --- a/io.c +++ b/io.c @@ -1275,6 +1275,8 @@ io_getpartial(int argc, VALUE *argv, VALUE io, int nonblock) goto again; rb_sys_fail(fptr->path); } + if (fptr->f) /* update pos in FILE structure [ruby-core:21561] */ + fflush(fptr->f); } rb_str_resize(str, n); -- cgit v1.2.3