aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/io.c b/io.c
index 3afa413183..2c18e07c75 100644
--- a/io.c
+++ b/io.c
@@ -1159,6 +1159,8 @@ static void clear_readconv(rb_io_t *fptr);
* f.rewind #=> 0
* f.lineno #=> 0
* f.readline #=> "This is line one\n"
+ *
+ * Note that it cannot be used with streams such as pipes, ttys, and sockets.
*/
static VALUE
@@ -1241,8 +1243,10 @@ io_fillbuf(rb_io_t *fptr)
* r, w = IO.pipe
* r.eof? # blocks forever
*
- * Note that <code>IO#eof?</code> reads data to a input buffer.
- * So <code>IO#sysread</code> doesn't work with <code>IO#eof?</code>.
+ * Note that <code>IO#eof?</code> reads data to the input buffer.
+ * So <code>IO#sysread</code> may not behave as you intend with
+ * <code>IO#eof?</code>, unless you call <code>IO#rewind</code>
+ * first (which is not available for some streams).
*/
VALUE