End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
ARGF#printf
ios.printf(format_string [, obj, ...]) → nil
io.c
View on GitHub ↗
VALUE
rb_io_printf(int argc, const VALUE *argv, VALUE out)
{
rb_io_write(out, rb_f_sprintf(argc, argv));
return Qnil;
}
Formats and writes to ios, converting parameters under control of the format string. See Kernel#sprintf for details.