Fix issue with Ruby 1.8.7 which did not allow for the return in an each_pair of the hash

This commit is contained in:
Travis Fields 2015-02-26 10:13:28 -08:00
parent 7021b1f55c
commit 419f51bdd9

View file

@ -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