Method: StringIO#size
- Defined in:
- stringio.c
#length ⇒ Integer #size ⇒ Integer
Returns the size of the buffer string.
1761 1762 1763 1764 1765 1766 1767 1768 1769 |
# File 'stringio.c', line 1761
static VALUE
strio_size(VALUE self)
{
VALUE string = StringIO(self)->string;
if (NIL_P(string)) {
return INT2FIX(0);
}
return ULONG2NUM(RSTRING_LEN(string));
}
|