readlines(...)
public
See <a href="/ruby/IO/readlines">IO#readlines</a>.
Show source
/*
* call-seq:
* strio.readlines(sep_string=$/) -> array
*
* See IO
*/
static VALUE
strio_readlines(argc, argv, self)
int argc;
VALUE *argv;
VALUE self;
{
struct StringIO *ptr = StringIO(self);
VALUE ary = rb_ary_new(), line;
while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
rb_ary_push(ary, line);
}
return ary;
}