このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 3.2 リファレンスマニュアル

module function FileUtils.#uptodate?

uptodate?(newer, older_list) -> bool[permalink][rdoc][edit]

newer が、older_list に含まれるすべてのファイルより新しいとき真。存在しないファイルは無限に古いとみなされます。

[PARAM] newer:
ファイルを一つ指定します。
[PARAM] older_list:
ファイル名の配列を指定します。
require 'fileutils'
FileUtils.uptodate?('hello.o', ['hello.c', 'hello.h']) or system('make')