Permalink
Browse files

Avoid need for Enumerable#sum extension

  • Loading branch information...
1 parent fa5d5e0 commit 96af8b69a4ca5f5bd349d12783d6eb2724e540d3 @jeremy jeremy committed Mar 29, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 activesupport/lib/active_support/xml_mini/rexml.rb
@@ -56,7 +56,9 @@ def merge_texts!(hash, element)
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

0 comments on commit 96af8b6

Please sign in to comment.