Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
StringIO#close
() -> nil
close → nil
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_close(VALUE self)
{
StringIO(self);
RBASIC(self)->flags &= ~STRIO_READWRITE;
return Qnil;
}
Closes self for both reading and writing.
Raises IOError if reading or writing is attempted.
Related: StringIO#close_read, StringIO#close_write.