diff --git a/CHANGELOG.md b/CHANGELOG.md index 772b0867..3fc234da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # History +## 0.5.7 +- Replace each_with_object (1.9.3+) with inject (1.8.7+) + ## 0.5.6 - Fix wildfly_resource when non managed properties are a hash diff --git a/lib/puppet/type/wildfly_resource.rb b/lib/puppet/type/wildfly_resource.rb index c32c9194..3a28d8b0 100644 --- a/lib/puppet/type/wildfly_resource.rb +++ b/lib/puppet/type/wildfly_resource.rb @@ -59,7 +59,7 @@ def recursive_sort!(obj) # Helper function to transform the hash def transform_hash(original, options = {}, &block) - original.each_with_object({}) do |(key, value), result| + original.inject({}) do |result, (key, value)| value = if options[:deep] && Hash === value transform_hash(value, options, &block) else