summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index 7c5ee6f20..b5641b2e7 100644
--- a/io.c
+++ b/io.c
@@ -534,7 +534,8 @@ io_fflush(rb_io_t *fptr)
l = PIPE_BUF;
}
r = rb_write_internal(fptr->fd, fptr->wbuf+fptr->wbuf_off, l);
- /* xxx: signal handler may modify wbuf */
+ /* xxx: other threads may modify wbuf */
+ rb_io_check_closed(fptr);
if (r == fptr->wbuf_len) {
fptr->wbuf_off = 0;
fptr->wbuf_len = 0;