diff --git a/lib/puppet/parser/functions/upcase.rb b/lib/puppet/parser/functions/upcase.rb index 22eae3a44..2b05db4ba 100644 --- a/lib/puppet/parser/functions/upcase.rb +++ b/lib/puppet/parser/functions/upcase.rb @@ -31,8 +31,8 @@ module Puppet::Parser::Functions 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