End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO::generic_readable#readchar
readchar → string
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_readchar(VALUE self)
{
VALUE c = rb_funcallv(self, rb_intern("getc"), 0, 0);
if (NIL_P(c)) rb_eof_error();
return c;
}
Like getc, but raises an exception if already at end-of-stream; see Character IO.