summaryrefslogtreecommitdiffstats
path: root/lib/fileutils.rb
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-02-10 10:48:38 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-02-10 10:48:38 +0000
commit810b8e1b359f6afaf13f059f4f6153eb3ef9a031 (patch)
tree0c9ac53334cc7da59a91fee92fca66a33d365fb9 /lib/fileutils.rb
parent89800697e5d28d123be00de047c85b4c44ce4c61 (diff)
downloadruby-810b8e1b359f6afaf13f059f4f6153eb3ef9a031.tar.gz
ruby-810b8e1b359f6afaf13f059f4f6153eb3ef9a031.tar.xz
ruby-810b8e1b359f6afaf13f059f4f6153eb3ef9a031.zip
* lib/fileutils.rb (FileUtils#uptodate?): use mtime for comparison.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r--lib/fileutils.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 4c86e2f3b..e42b74f9a 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -101,13 +101,13 @@ module FileUtils
# Returns true if +newer+ is newer than all +old_list+.
# Non-existent files are older than any file.
#
- # FileUtils.uptodate? 'hello.o', %w(hello.c hello.h) or system 'make'
+ # FileUtils.uptodate? 'hello.o', %w(hello.c hello.h) or system 'make hello.o'
#
def uptodate?( new, old_list, *options )
raise ArgumentError, 'uptodate? does not accept any option' unless options.empty?
return false unless FileTest.exist? new
- new_time = File.ctime(new)
+ new_time = File.mtime(new)
old_list.each do |old|
if FileTest.exist? old
return false unless new_time > File.mtime(old)