Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
IO::generic_readable#sysread
strio.sysread(integer[, outbuf]) → string
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_sysread(int argc, VALUE *argv, VALUE self)
{
VALUE val = rb_funcallv_kw(self, rb_intern("read"), argc, argv, RB_PASS_CALLED_KEYWORDS);
if (NIL_P(val)) {
rb_eof_error();
}
return val;
}
Similar to read, but raises EOFError at end of string instead of returning nil, as well as IO#sysread does.