lib/nanoc/base/entities/identifiable_collection.rb in nanoc-4.1.1 vs lib/nanoc/base/entities/identifiable_collection.rb in nanoc-4.1.2

- old
+ new

@@ -16,10 +16,11 @@ @objects = [] end def freeze @objects.freeze + @objects.each(&:freeze) build_mapping super end def [](arg) @@ -48,10 +49,10 @@ end protected def object_with_identifier(identifier) - if self.frozen? + if frozen? @mapping[identifier.to_s] else @objects.find { |i| i.identifier == identifier } end end