diff --git a/lib/jekyll/frontmatter_defaults.rb b/lib/jekyll/frontmatter_defaults.rb index ef7d8339..c3b73ef9 100644 --- a/lib/jekyll/frontmatter_defaults.rb +++ b/lib/jekyll/frontmatter_defaults.rb @@ -10,11 +10,10 @@ module Jekyll # Initializes a new instance. def initialize(site) @site = site - reset end def reset - @glob_cache = {} + @glob_cache = {} if @glob_cache end def update_deprecated_types(set) @@ -130,6 +129,7 @@ module Jekyll end def glob_cache(path) + @glob_cache ||= {} @glob_cache[path] ||= Dir.glob(path) end