We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rake rdoc
1 parent de4d874 commit 540103cCopy full SHA for 540103c
railties/lib/rails/api/task.rb
@@ -160,8 +160,9 @@ def configure_rdoc_files
160
161
# Only generate documentation for files that have been
162
# changed since the API was generated.
163
- if Dir.exist?(api_dir) && !ENV["ALL"]
164
- last_generation = DateTime.rfc2822(File.open("#{api_dir}/created.rid", &:readline))
+ timestamp_path = "#{api_dir}/created.rid"
+ if File.exist?(timestamp_path) && !File.zero?(timestamp_path) && !ENV["ALL"]
165
+ last_generation = DateTime.rfc2822(File.open(timestamp_path, &:readline))
166
167
rdoc_files.keep_if do |file|
168
File.mtime(file).to_datetime > last_generation
0 commit comments