instance method
StringIO#closed_read?
() -> bool
closed_read? → true or false
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_closed_read(VALUE self)
{
StringIO(self);
if (READABLE(self)) return Qfalse;
return Qtrue;
}
Returns whether self is closed for reading:
Example
strio = StringIO.new strio.closed_read? # => false strio.close_read strio.closed_read? # => true
Related: StringIO#closed?, StringIO#closed_write?, StringIO#close_read.