diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-04-23 01:09:27 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-04-23 01:09:27 +0100 |
commit | 5a1fe9039b33414b7088813712e03bbe38567cff (patch) | |
tree | 10e3a15c06494dd09c0324dca894ddcbb68ce582 /activesupport/lib/active_support/xml_mini | |
parent | 3384f073e35c5391deaeb209a62a485a0c4dd7b1 (diff) | |
parent | 7f6779c1d5e4ec7f642839caa7e86320720f77c8 (diff) | |
download | rails-5a1fe9039b33414b7088813712e03bbe38567cff.tar.gz rails-5a1fe9039b33414b7088813712e03bbe38567cff.tar.bz2 rails-5a1fe9039b33414b7088813712e03bbe38567cff.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'activesupport/lib/active_support/xml_mini')
-rw-r--r-- | activesupport/lib/active_support/xml_mini/libxml.rb | 8 | ||||
-rw-r--r-- | activesupport/lib/active_support/xml_mini/nokogiri.rb | 6 | ||||
-rw-r--r-- | activesupport/lib/active_support/xml_mini/rexml.rb | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/xml_mini/libxml.rb b/activesupport/lib/active_support/xml_mini/libxml.rb index 3586b24a6b..370205409a 100644 --- a/activesupport/lib/active_support/xml_mini/libxml.rb +++ b/activesupport/lib/active_support/xml_mini/libxml.rb @@ -21,15 +21,15 @@ module ActiveSupport end end -module LibXML - module Conversions - module Document +module LibXML #:nodoc: + module Conversions #:nodoc: + module Document #:nodoc: def to_hash root.to_hash end end - module Node + module Node #:nodoc: CONTENT_ROOT = '__content__' LIB_XML_LIMIT = 30000000 # Hardcoded LibXML limit diff --git a/activesupport/lib/active_support/xml_mini/nokogiri.rb b/activesupport/lib/active_support/xml_mini/nokogiri.rb index 10281584fc..8f9676e4f6 100644 --- a/activesupport/lib/active_support/xml_mini/nokogiri.rb +++ b/activesupport/lib/active_support/xml_mini/nokogiri.rb @@ -18,14 +18,14 @@ module ActiveSupport end end - module Conversions - module Document + module Conversions #:nodoc: + module Document #:nodoc: def to_hash root.to_hash end end - module Node + module Node #:nodoc: CONTENT_ROOT = '__content__' # Convert XML document to hash 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 |