Skip to content

Commit

Permalink
Merge pull request #224 from doudou/master
Browse files Browse the repository at this point in the history
fix quadratic performance in FileTask#out_of_date?
  • Loading branch information
hsbt committed Oct 18, 2017
2 parents f962d63 + 85fa80d commit f04586d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rake/file_task.rb
Expand Up @@ -30,10 +30,10 @@ def timestamp

# Are there any prerequisites with a later time than the given time stamp?
def out_of_date?(stamp)
@prerequisites.any? { |prereq|
all_prerequisite_tasks.any? { |prereq|
prereq_task = application[prereq, @scope]
if prereq_task.instance_of?(Rake::FileTask)
prereq_task.timestamp > stamp || prereq_task.needed?
prereq_task.timestamp > stamp || @application.options.build_all
else
prereq_task.timestamp > stamp
end
Expand Down

0 comments on commit f04586d

Please sign in to comment.