From 96af8b69a4ca5f5bd349d12783d6eb2724e540d3 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 28 Mar 2009 23:55:18 -0700 Subject: Avoid need for Enumerable#sum extension --- activesupport/lib/active_support/xml_mini/rexml.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/xml_mini/rexml.rb b/activesupport/lib/active_support/xml_mini/rexml.rb index a8fdeca967..771109514c 100644 --- a/activesupport/lib/active_support/xml_mini/rexml.rb +++ b/activesupport/lib/active_support/xml_mini/rexml.rb @@ -56,7 +56,9 @@ module ActiveSupport hash else # must use value to prevent double-escaping - merge!(hash, CONTENT_KEY, element.texts.sum(&:value)) + texts = '' + element.texts.each { |t| texts << t.value } + merge!(hash, CONTENT_KEY, texts) end end -- cgit v1.2.3