readline(...)
public
Reads a line as with IO#gets, but raises an EOFError on end of file.
Show source
/*
* call-seq:
* ios.readline(sep_string=$/) => string
*
* Reads a line as with <code>IO
* <code>EOFError</code> on end of file.
*/
static VALUE
rb_io_readline(argc, argv, io)
int argc;
VALUE *argv;
VALUE io;
{
VALUE line = rb_io_gets_m(argc, argv, io);
if (NIL_P(line)) {
rb_eof_error();
}
return line;
}