summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-31 07:07:21 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-31 07:07:21 +0000
commitad98dd2c24f5a09596ecaefaa8a330d2d433ca72 (patch)
tree3f7bf15410d77ed28262247c3f554dab56460f20 /io.c
parentc23f894d3096eee1a50e56662b04d5ba87874a21 (diff)
* 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@21913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io.c b/io.c
index 4635bd92f1..ae683ce980 100644
--- a/io.c
+++ b/io.c
@@ -1285,6 +1285,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);