Ruby 3.1 リファレンスマニュアル > ライブラリ一覧 > io/consoleライブラリ > IOクラス > ioflush
ioflush -> self
カーネルの入出力バッファをフラッシュします。