Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions ext/stringio/stringio.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,18 @@ strio_to_read(VALUE self)
* call-seq:
* eof? -> true or false
*
* Returns +true+ if positioned at end-of-stream, +false+ otherwise;
* see {Position}[rdoc-ref:IO@Position].
* Returns whether +self+ is positioned at end-of-stream:
*
* strio = StringIO.new('foo')
* strio.pos # => 0
* strio.eof? # => false
* strio.read # => "foo"
* strio.pos # => 3
* strio.eof? # => true
* strio.close_read
* strio.eof? # Raises IOError: not opened for reading
*
* Raises IOError if the stream is not opened for reading.
* Related: StringIO#pos.
*/
static VALUE
strio_eof(VALUE self)
Expand Down
Loading