From: Travis Fields Date: Thu, 26 Feb 2015 18:13:28 +0000 (-0800) Subject: Fix issue with Ruby 1.8.7 which did not allow for the return in an each_pair of the... X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=419f51bdd9d2aa35a94fbabbfaaf1cbfd81920f4;p=puppet-stdlib.git Fix issue with Ruby 1.8.7 which did not allow for the return in an each_pair of the hash --- 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