summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/io.c b/io.c
index c222dd5377..30fb42d932 100644
--- a/io.c
+++ b/io.c
@@ -1940,13 +1940,11 @@ io_binwritev_internal(VALUE arg)
iov->iov_base = (char *)iov->iov_base + result;
iov->iov_len -= result;
-
- errno = EAGAIN;
}
-
- if (rb_io_maybe_wait_writable(errno, fptr->self, Qnil)) {
+ else if (rb_io_maybe_wait_writable(errno, fptr->self, Qnil)) {
rb_io_check_closed(fptr);
- } else {
+ }
+ else {
return -1;
}
}