close()
public
Closes strio. The strio is unavailable for any further data
operations; an IOError is raised if
such an attempt is made.
Show source
static VALUE
strio_close(VALUE self)
{
struct StringIO *ptr = StringIO(self);
if (CLOSED(ptr)) {
rb_raise(rb_eIOError, "closed stream");
}
ptr->flags &= ~FMODE_READWRITE;
return Qnil;
}