End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
IO#readbyte
ios.readbyte → integer
io.c
View on GitHub ↗
static VALUE
rb_io_readbyte(VALUE io)
{
VALUE c = rb_io_getbyte(io);
if (NIL_P(c)) {
rb_eof_error();
}
return c;
}
Reads a byte as with IO#getbyte, but raises an EOFError on end of file.