Revert memoizing Site#docs_to_write and #documents (#7684)

Merge pull request 7684
This commit is contained in:
Ashwin Maroli 2019-05-31 06:58:03 +05:30 committed by jekyllbot
parent 263d41f0f7
commit 554e07d4a5
1 changed files with 3 additions and 3 deletions

View File

@ -326,15 +326,15 @@ module Jekyll
#
# Returns an Array of Documents which should be written
def docs_to_write
@docs_to_write ||= documents.select(&:write?)
documents.select(&:write?)
end
# Get all the documents
#
# Returns an Array of all Documents
def documents
@documents ||= collections.reduce(Set.new) do |docs, (_, collection)|
docs + collection.docs + collection.files
collections.each_with_object(Set.new) do |(_, collection), set|
set.merge(collection.docs).merge(collection.files)
end.to_a
end