aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-03-28 23:55:18 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-03-28 23:55:18 -0700
commit96af8b69a4ca5f5bd349d12783d6eb2724e540d3 (patch)
tree01e7e6990b5222e8ef7bb600ade71799f00c1307 /activesupport
parentfa5d5e0d16686a69d3843c30c5b8ed3a1c54f160 (diff)
downloadrails-96af8b69a4ca5f5bd349d12783d6eb2724e540d3.tar.gz
rails-96af8b69a4ca5f5bd349d12783d6eb2724e540d3.tar.bz2
rails-96af8b69a4ca5f5bd349d12783d6eb2724e540d3.zip
Avoid need for Enumerable#sum extension
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/xml_mini/rexml.rb4
1 files changed, 3 insertions, 1 deletions
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