Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
MakeMakefile#modified?
modified?(target, times)
lib/mkmf.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/mkmf.rb, line 285
def modified?(target, times)
(t = File.mtime(target)) rescue return nil
Array === times or times = [times]
t if times.all? {|n| n <= t}
end
Returns time stamp of the target file if it exists and is newer than or equal to all of times.