]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Fix issue with Ruby 1.8.7 which did not allow for the return in an each_pair of the...
authorTravis Fields <travis@puppetlabs.com>
Thu, 26 Feb 2015 18:13:28 +0000 (10:13 -0800)
committerTravis Fields <travis@puppetlabs.com>
Thu, 26 Feb 2015 18:13:28 +0000 (10:13 -0800)
lib/puppet/parser/functions/upcase.rb

index 22eae3a44e9949b6ec25f999b983cf419001fb0e..2b05db4bad407f8d9faf0546857c857f2848078b 100644 (file)
@@ -31,8 +31,8 @@ Will return:
       result = value.collect { |i| i.is_a?(String) ? i.upcase : i }
     elsif value.is_a?(Hash)
       result = {}
-      result << value.each_pair do |k, v|
-        return {k.upcase => v.collect! { |p| p.upcase }}
+      value.each_pair do |k, v|
+        result.merge!({k.upcase => v.collect! { |p| p.upcase }})
       end
     else
       result = value.upcase