lib/nanoc/base/repos/aggregate_data_source.rb in nanoc-4.6.2 vs lib/nanoc/base/repos/aggregate_data_source.rb in nanoc-4.6.3

- old
+ new

@@ -6,15 +6,19 @@ @data_sources = data_sources @config = config end def items - objs = @data_sources.flat_map(&:items) - @_items ||= Nanoc::Int::IdentifiableCollection.from(objs, @config) + @_items ||= begin + objs = @data_sources.flat_map(&:items) + Nanoc::Int::IdentifiableCollection.from(objs, @config) + end end def layouts - objs = @data_sources.flat_map(&:layouts) - @_layouts ||= Nanoc::Int::IdentifiableCollection.from(objs, @config) + @_layouts ||= begin + objs = @data_sources.flat_map(&:layouts) + Nanoc::Int::IdentifiableCollection.from(objs, @config) + end end end end