diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-13 10:41:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-13 10:41:34 +0000 |
commit | 34d420acc405366e8a24b87c408c2514058a24d2 (patch) | |
tree | c6b68734052db12f252653820eb6738dddb9f531 /io.c | |
parent | f087533b8ba13fa3f1765618067ab298b97ebea1 (diff) | |
download | ruby-34d420acc405366e8a24b87c408c2514058a24d2.tar.gz |
io.c: copy_stream to duplex IO
* io.c (copy_stream_body): use IO to write to copy to duplex IO.
http://twitter.com/knu/status/786505317974585344
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; |