Skip to content

Commit

Permalink
Make #read doc more clear in io.cr (crystal-lang#5873)
Browse files Browse the repository at this point in the history
  • Loading branch information
Heaven31415 authored and RX14 committed Mar 27, 2018
1 parent 9980a1f commit 9f28c77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/io.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ require "c/errno"
# The `IO` class is the basis for all input and output in Crystal.
#
# This class is inherited by types like `File`, `Socket` and `IO::Memory` and
# provide many useful methods for reading to and writing from an IO, like `print`, `puts`,
# provide many useful methods for reading from and writing to an IO, like `print`, `puts`,
# `gets` and `printf`.
#
# The only requirement for a type including the `IO` module is to define
# these two methods:
#
# * `read(slice : Bytes)`: read at most *slice.size* bytes into *slice* and return the number of bytes read
# * `read(slice : Bytes)`: read at most *slice.size* bytes from IO into *slice* and return the number of bytes read
# * `write(slice : Bytes)`: write the whole *slice* into the IO
#
# For example, this is a simple `IO` on top of a `Bytes`:
Expand Down

0 comments on commit 9f28c77

Please sign in to comment.