lib/pdk/config/namespace.rb in pdk-3.0.0 vs lib/pdk/config/namespace.rb in pdk-3.0.1

- old
+ new

@@ -215,10 +215,12 @@ # Disables the namespace, and child namespaces, from writing changes to disk. # Typically this is only needed for unit testing. # @api private def read_only! @read_only = true - @mounts.each { |_, child| child.read_only! } + # pass the read_only! method as a block to the each_value method. This means that + # for each value in the @mounts hash, the read_only! method will be called on that value. + @mounts.each_value(&:read_only!) end private # Returns the object class to create settings with. Subclasses may override this to use specific setting classes