diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-28 23:55:18 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-28 23:55:18 -0700 |
commit | 96af8b69a4ca5f5bd349d12783d6eb2724e540d3 (patch) | |
tree | 01e7e6990b5222e8ef7bb600ade71799f00c1307 /activesupport/lib/active_support/xml_mini/rexml.rb | |
parent | fa5d5e0d16686a69d3843c30c5b8ed3a1c54f160 (diff) | |
download | rails-96af8b69a4ca5f5bd349d12783d6eb2724e540d3.tar.gz rails-96af8b69a4ca5f5bd349d12783d6eb2724e540d3.tar.bz2 rails-96af8b69a4ca5f5bd349d12783d6eb2724e540d3.zip |
Avoid need for Enumerable#sum extension
Diffstat (limited to 'activesupport/lib/active_support/xml_mini/rexml.rb')
-rw-r--r-- | activesupport/lib/active_support/xml_mini/rexml.rb | 4 |
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 |