diff options
Diffstat (limited to 'activesupport/lib/active_support/xml_mini/rexml.rb')
-rw-r--r-- | activesupport/lib/active_support/xml_mini/rexml.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/xml_mini/rexml.rb b/activesupport/lib/active_support/xml_mini/rexml.rb index 091a15294c..5fd8978fc0 100644 --- a/activesupport/lib/active_support/xml_mini/rexml.rb +++ b/activesupport/lib/active_support/xml_mini/rexml.rb @@ -1,5 +1,7 @@ -require "active_support/core_ext/kernel/reporting" -require "active_support/core_ext/object/blank" +# frozen_string_literal: true + +require_relative "../core_ext/kernel/reporting" +require_relative "../core_ext/object/blank" require "stringio" module ActiveSupport @@ -74,7 +76,7 @@ module ActiveSupport hash else # must use value to prevent double-escaping - texts = "" + texts = "".dup element.texts.each { |t| texts << t.value } merge!(hash, CONTENT_KEY, texts) end @@ -113,7 +115,7 @@ module ActiveSupport # XML element to extract attributes from. def get_attributes(element) attributes = {} - element.attributes.each { |n,v| attributes[n] = v } + element.attributes.each { |n, v| attributes[n] = v } attributes end |