/* * call-seq: * strio.size -> integer * * Returns the size of the buffer string. */ static VALUE strio_size(self) VALUE self; { VALUE string = StringIO(self)->string; if (NIL_P(string)) { rb_raise(rb_eIOError, "not opened"); } return ULONG2NUM(RSTRING(string)->len); }