public Method

IO.readline(...)

ios.readline(sep_string=$/)    string

Reads a line as with IO#gets, but raises an EOFError on end of file.

Source Code

/*
*  call-seq:
*     ios.readline(sep_string=$/)   => string
*  
*  Reads a line as with <code>IO#gets</code>, but raises an
*  <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;
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.