Skip to content

Commit 419f51b

Browse files
author
Travis Fields
committed
Fix issue with Ruby 1.8.7 which did not allow for the return in an each_pair of the hash
1 parent 7021b1f commit 419f51b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/puppet/parser/functions/upcase.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ module Puppet::Parser::Functions
3131
result = value.collect { |i| i.is_a?(String) ? i.upcase : i }
3232
elsif value.is_a?(Hash)
3333
result = {}
34-
result << value.each_pair do |k, v|
35-
return {k.upcase => v.collect! { |p| p.upcase }}
34+
value.each_pair do |k, v|
35+
result.merge!({k.upcase => v.collect! { |p| p.upcase }})
3636
end
3737
else
3838
result = value.upcase

0 commit comments

Comments
 (0)