Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
IO#printf
printf(format_string, *objects) → 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 objects to the stream.
For details on format_string, see Format Specifications.