summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
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 5cffc6eeec..8d2ed8d06c 100644
--- a/io.c
+++ b/io.c
@@ -10229,9 +10229,9 @@ copy_stream_body(VALUE arg)
#ifdef O_BINARY
if (src_fptr)
SET_BINARY_MODE_WITH_SEEK_CUR(src_fptr);
- if (dst_fptr)
- setmode(dst_fd, O_BINARY);
#endif
+ if (dst_fptr)
+ rb_io_ascii8bit_binmode(dst_io);
if (stp->src_offset == (off_t)-1 && src_fptr && src_fptr->rbuf.len) {
size_t len = src_fptr->rbuf.len;