End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
StringIO#closed?
strio.closed? → true or false
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_closed(VALUE self)
{
StringIO(self);
if (!CLOSED(self)) return Qfalse;
return Qtrue;
}
Returns true if the stream is completely closed, false otherwise.