summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/io.c b/io.c
index 1c47a6dcbb..ffca78ac2b 100644
--- a/io.c
+++ b/io.c
@@ -3679,13 +3679,11 @@ io_write_nonblock(rb_execution_context_t *ec, VALUE io, VALUE str, VALUE ex)
* call-seq:
* read(maxlen = nil, out_string = nil) -> new_string, out_string, or nil
*
- * Reads bytes from the stream, (in binary mode);
- * the stream must be opened for reading
+ * Reads bytes from the stream; the stream must be opened for reading
* (see {Access Modes}[rdoc-ref:File@Access+Modes]):
*
- * - If +maxlen+ is +nil+, reads all bytes.
- * - Otherwise reads +maxlen+ bytes, if available.
- * - Otherwise reads all bytes.
+ * - If +maxlen+ is +nil+, reads all bytes using the stream's data mode.
+ * - Otherwise reads up to +maxlen+ bytes in binary mode.
*
* Returns a string (either a new string or the given +out_string+)
* containing the bytes read.