diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb index afec0c724..cbb978e7f 100644 --- a/lib/rake/file_task.rb +++ b/lib/rake/file_task.rb @@ -29,12 +29,12 @@ def timestamp # Are there any prerequisites with a later time than the given time stamp? def out_of_date?(stamp) - @prerequisites.any? { |p| - ptask = application[p, @scope] - if ptask.instance_of?(Rake::FileTask) - ptask.timestamp > stamp || ptask.needed? + @prerequisites.any? { |prereq| + prereq_task = application[prereq, @scope] + if prereq_task.instance_of?(Rake::FileTask) + prereq_task.timestamp > stamp || prereq_task.needed? else - ptask.timestamp > stamp + prereq_task.timestamp > stamp end } end