aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 35f6fb699b..cba9318590 100644
--- a/io.c
+++ b/io.c
@@ -10657,7 +10657,7 @@ copy_stream_body(VALUE arg)
else {
VALUE tmp_io = rb_io_check_io(dst_io);
if (!NIL_P(tmp_io)) {
- dst_io = tmp_io;
+ dst_io = GetWriteIO(tmp_io);
}
else if (!RB_TYPE_P(dst_io, T_FILE)) {
VALUE args[3];