diff options
author | Morgan Haskel <morgan@puppetlabs.com> | 2015-02-26 10:51:10 -0800 |
---|---|---|
committer | Morgan Haskel <morgan@puppetlabs.com> | 2015-02-26 10:51:10 -0800 |
commit | cd6568039f53a59c145239012e9ada14685eed88 (patch) | |
tree | 142f59f4eb6d85e68ae634c6593cc19a863172ab /lib/puppet/parser/functions | |
parent | 1ccc4f5e0e77640a2ee3c673ece773cbd17e4981 (diff) | |
parent | 419f51bdd9d2aa35a94fbabbfaaf1cbfd81920f4 (diff) | |
download | puppet-stdlib-cd6568039f53a59c145239012e9ada14685eed88.tar.gz puppet-stdlib-cd6568039f53a59c145239012e9ada14685eed88.tar.bz2 |
Merge pull request #418 from cyberious/UpcaseHash
Fix issue with 1.8.7 and upcase
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r-- | lib/puppet/parser/functions/upcase.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/upcase.rb b/lib/puppet/parser/functions/upcase.rb index 22eae3a..2b05db4 100644 --- a/lib/puppet/parser/functions/upcase.rb +++ b/lib/puppet/parser/functions/upcase.rb @@ -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 |