From 419f51bdd9d2aa35a94fbabbfaaf1cbfd81920f4 Mon Sep 17 00:00:00 2001 From: Travis Fields Date: Thu, 26 Feb 2015 10:13:28 -0800 Subject: Fix issue with Ruby 1.8.7 which did not allow for the return in an each_pair of the hash --- lib/puppet/parser/functions/upcase.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/puppet/parser/functions') 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 -- cgit v1.2.3