Method: StringIO#initialize
- Defined in:
- stringio.c
#new(string = ""[, mode]) ⇒ Object
Creates new StringIO instance from with string and mode.
258 259 260 261 262 263 264 265 266 267 268 |
# File 'stringio.c', line 258
static VALUE
strio_initialize(int argc, VALUE *argv, VALUE self)
{
struct StringIO *ptr = check_strio(self);
if (!ptr) {
DATA_PTR(self) = ptr = strio_alloc();
}
rb_call_super(0, 0);
return strio_init(argc, argv, ptr, self);
}
|