8000 * lib/fileutils.rb (FileUtils#uptodate?): use mtime for comparison. · documenting-ruby/ruby@dc502ae · GitHub
[go: up one dir, main page]

Skip to content

Commit dc502ae

Browse files
author
aamine
committed
* lib/fileutils.rb (FileUtils#uptodate?): use mtime for comparison.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent ab24be4 commit dc502ae

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Mon Feb 10 19:54:30 2003 Minero Aoki <aamine@loveruby.net>
2+
3+
* lib/fileutils.rb (FileUtils#uptodate?): use mtime for
4+
comparison.
5+
16
Mon Feb 10 10:14:26 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
27

38
* array.c (rb_ary_to_a): return value should be an Array if the

lib/fileutils.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ def cd( dir, *options, &block ) # :yield: dir
101101
# Returns true if +newer+ is newer than all +old_list+.
102102
# Non-existent files are older than any file.
103103
#
104-
# FileUtils.uptodate? 'hello.o', %w(hello.c hello.h) or system 'make'
104+
# FileUtils.uptodate? 'hello.o', %w(hello.c hello.h) or system 'make hello.o'
105105
#
106106
def uptodate?( new, old_list, *options )
107107
raise ArgumentError, 'uptodate? does not accept any option' unless options.empty?
108108

109109
return false unless FileTest.exist? new
110-
new_time = File.ctime(new)
110+
new_time = File.mtime(new)
111111
old_list.each do |old|
112112
if FileTest.exist? old
113113
return false unless new_time > File.mtime(old)

0 commit comments

Comments
 (0)
0