Skip to content

Commit

Permalink
Fix issue with Ruby 1.8.7 which did not allow for the return in an ea…
Browse files Browse the repository at this point in the history
…ch_pair of the hash
  • Loading branch information
Travis Fields committed Feb 26, 2015
1 parent 7021b1f commit 419f51b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puppet/parser/functions/upcase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 419f51b

Please sign in to comment.