End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO::generic_readable#readline
strio.readline(sep=$/, chomp: false) → string
strio.readline(limit, chomp: false) → string or nil
strio.readline(sep, limit, chomp: false) → string or nil
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_readline(int argc, VALUE *argv, VALUE self)
{
VALUE line = rb_funcallv_kw(self, rb_intern("gets"), argc, argv, RB_PASS_CALLED_KEYWORDS);
if (NIL_P(line)) rb_eof_error();
return line;
}
See IO#readline.