From 554e07d4a51d51a8b65461b98015ca9e7422cc1c Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 31 May 2019 06:58:03 +0530 Subject: [PATCH] Revert memoizing Site#docs_to_write and #documents (#7684) Merge pull request 7684 --- lib/jekyll/site.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 43a652cc..50653e90 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -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