We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3562c34 commit 5034156Copy full SHA for 5034156
ext/stringio/stringio.c
@@ -699,10 +699,18 @@ strio_to_read(VALUE self)
699
* call-seq:
700
* eof? -> true or false
701
*
702
- * Returns +true+ if positioned at end-of-stream, +false+ otherwise;
703
- * see {Position}[rdoc-ref:IO@Position].
+ * Returns whether +self+ is positioned at end-of-stream:
+ *
704
+ * strio = StringIO.new('foo')
705
+ * strio.pos # => 0
706
+ * strio.eof? # => false
707
+ * strio.read # => "foo"
708
+ * strio.pos # => 3
709
+ * strio.eof? # => true
710
+ * strio.close_read
711
+ * strio.eof? # Raises IOError: not opened for reading
712
- * Raises IOError if the stream is not opened for reading.
713
+ * Related: StringIO#pos.
714
*/
715
static VALUE
716
strio_eof(VALUE self)
0 commit comments