summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/upcase.rb
diff options
context:
space:
mode:
authorTravis Fields <travis@puppetlabs.com>2015-02-26 10:13:28 -0800
committerTravis Fields <travis@puppetlabs.com>2015-02-26 10:13:28 -0800
commit419f51bdd9d2aa35a94fbabbfaaf1cbfd81920f4 (patch)
tree142f59f4eb6d85e68ae634c6593cc19a863172ab /lib/puppet/parser/functions/upcase.rb
parent7021b1f55cdc320c7eb389cd91f6be294629669b (diff)
Fix issue with Ruby 1.8.7 which did not allow for the return in an each_pair of the hash
Diffstat (limited to 'lib/puppet/parser/functions/upcase.rb')
-rw-r--r--lib/puppet/parser/functions/upcase.rb4
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