lib/i18n/backend/gettext.rb in i18n-0.4.1 vs lib/i18n/backend/gettext.rb in i18n-0.4.2
- old
+ new
@@ -47,12 +47,10 @@
parts = key.split('|').reverse
normalized = parts.inject({}) do |normalized, part|
normalized = { part => normalized.empty? ? value : normalized }
end
- # deep_merge by Stefan Rusterholz, see http://www.ruby-forum.com/topic/142809
- merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 }
- result.merge!(normalized, &merger)
+ result.deep_merge!(normalized)
end
result
end
end