lines(*args)
public
Returns an enumerator that gives each line in
ios. The stream must be opened for reading or an IOError will be raised.
f = File.new("testfile")
f.lines.to_a
f.rewind
f.lines.sort
Show source
static VALUE
rb_io_lines(int argc, VALUE *argv, VALUE io)
{
return rb_enumeratorize(io, ID2SYM(rb_intern("each_line")), argc, argv);
}