Ruby 2.6.0 リファレンスマニュアル > ライブラリ一覧 > stringioライブラリ > StringIOクラス > lineno=
lineno=(n)
現在の行番号を n にセットします。