End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO#readline
ios.readline(sep=$/ [, getline_args]) → string
ios.readline(limit [, getline_args]) → string
ios.readline(sep, limit [, getline_args]) → string
io.c
View on GitHub ↗
static VALUE
rb_io_readline(int argc, VALUE *argv, VALUE io)
{
VALUE line = rb_io_gets_m(argc, argv, io);
if (NIL_P(line)) {
rb_eof_error();
}
return line;
}