diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index c36b49699..6d9fd320d 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -15,7 +15,7 @@ class FileTask < Task # is out of date. def needed? begin - out_of_date?(File.mtime(name)) || @application.options.build_all + @application.options.build_all || out_of_date?(File.mtime(name)) rescue Errno::ENOENT true end @@ -36,11 +36,7 @@ def timestamp def out_of_date?(stamp) all_prerequisite_tasks.any? { |prereq| prereq_task = application[prereq, @scope] - if prereq_task.instance_of?(Rake::FileTask) - prereq_task.timestamp > stamp || @application.options.build_all - else - prereq_task.timestamp > stamp - end + prereq_task.timestamp > stamp } end