= private = protected
close_write()
Closes the write end of a StringIO. Will raise an IOError if the strio is not writeable.
static VALUE strio_close_write(VALUE self) { struct StringIO *ptr = StringIO(self); if (!WRITABLE(ptr)) { rb_raise(rb_eIOError, "closing non-duplex IO for writing"); } ptr->flags &= ~FMODE_WRITABLE; return Qnil; }