Method: Kernel#readlines

Defined in:
io.c

#readlines(sep = $/) ⇒ Array #readlines(limit) ⇒ Array #readlines(sep, limit) ⇒ Array

Returns an array containing the lines returned by calling Kernel.gets(sep) until the end of file.

Overloads:



8993
8994
8995
8996
8997
8998
8999
9000
# File 'io.c', line 8993

static VALUE
rb_f_readlines(int argc, VALUE *argv, VALUE recv)
{
    if (recv == argf) {
	return argf_readlines(argc, argv, argf);
    }
    return rb_funcallv(argf, rb_intern("readlines"), argc, argv);
}