このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
size?(path) -> Integer | nil
FileTest.#size? と同じです。