summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-21 10:09:33 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-21 10:09:33 +0000
commitb1166a04694766f24385a5a91e028e39f7bd2461 (patch)
treed3e81fe5a5226b838aa9c8cdc6205b7f488464e2 /io.c
parentffc456d0ed1acf478ff991c88e35b2038dccb402 (diff)
* io.c (copy_stream_body): call rb_io_check_readable and
rb_io_check_writable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io.c b/io.c
index 22b82bba8d..d682ea288a 100644
--- a/io.c
+++ b/io.c
@@ -6628,6 +6628,7 @@ copy_stream_body(VALUE arg)
stp->close_src = 1;
}
GetOpenFile(src_io, src_fptr);
+ rb_io_check_readable(src_fptr);
src_fd = src_fptr->fd;
}
stp->src_fd = src_fd;
@@ -6660,6 +6661,7 @@ copy_stream_body(VALUE arg)
stp->dst = dst_io;
}
GetOpenFile(dst_io, dst_fptr);
+ rb_io_check_writable(dst_fptr);
dst_fd = dst_fptr->fd;
}
stp->dst_fd = dst_fd;