Method: StringIO#eof

Defined in:
stringio.c

#eof?Boolean

Returns true if positioned at end-of-stream, false otherwise; see Position.

Raises IOError if the stream is not opened for reading.

Returns:

  • (Boolean)


624
625
626
627
628
629
# File 'stringio.c', line 624

static VALUE
strio_eof(VALUE self)
{
    if (strio_to_read(self)) return Qfalse;
    return Qtrue;
}