summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-05 11:12:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-05 11:12:17 +0000
commitd7f6b873da0885e771515aff8bfa1aafecff90df (patch)
treee85c63d11c786933f8d48b8590514d8f71aa1f78 /io.c
parent58967f4fcd38b3b9946fe7c07614d3d01e417d2c (diff)
* io.c (io_fflush): IO#flush problem within threads. a patch from
<s.wanabe at gmail.com> in [ruby-dev:34595]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 4c9a50d80a..6770b41e1c 100644
--- a/io.c
+++ b/io.c
@@ -584,8 +584,8 @@ io_fflush(rb_io_t *fptr)
return 0;
}
if (0 <= r) {
- fptr->wbuf_off = r;
- fptr->wbuf_len = r;
+ fptr->wbuf_off += r;
+ fptr->wbuf_len -= r;
errno = EAGAIN;
}
if (rb_io_wait_writable(fptr->fd)) {