Method: StringIO#size
- Defined in:
- ext/stringio/stringio.c
#length ⇒ Integer #size ⇒ Integer
Returns the size of the buffer string.
1700 1701 1702 1703 1704 1705 1706 1707 1708 |
# File 'ext/stringio/stringio.c', line 1700
static VALUE
strio_size(VALUE self)
{
VALUE string = StringIO(self)->string;
if (NIL_P(string)) {
rb_raise(rb_eIOError, "not opened");
}
return ULONG2NUM(RSTRING_LEN(string));
}
|