aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/xml_mini/xml_mini_engine_test.rb
diff options
context:
space:
mode:
authorJosh Nussbaum <joshua.nussbaum@shopify.com>2017-04-20 16:31:50 -0400
committerJosh Nussbaum <joshua.nussbaum@shopify.com>2017-04-20 16:31:50 -0400
commit62b1b1722165547bb7d0d8e0a3221f43b9de63d9 (patch)
tree4c4b66902faf3683570734c9f068a8c484e62fbd /activesupport/test/xml_mini/xml_mini_engine_test.rb
parentef0b05e78fb0b928c7ef48d3c365dc849af50305 (diff)
downloadrails-62b1b1722165547bb7d0d8e0a3221f43b9de63d9.tar.gz
rails-62b1b1722165547bb7d0d8e0a3221f43b9de63d9.tar.bz2
rails-62b1b1722165547bb7d0d8e0a3221f43b9de63d9.zip
Fixes Hash.from_xml with frozen strings for all backends
Diffstat (limited to 'activesupport/test/xml_mini/xml_mini_engine_test.rb')
-rw-r--r--activesupport/test/xml_mini/xml_mini_engine_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/xml_mini/xml_mini_engine_test.rb b/activesupport/test/xml_mini/xml_mini_engine_test.rb
index 5be9084c9d..244e0b0d3a 100644
--- a/activesupport/test/xml_mini/xml_mini_engine_test.rb
+++ b/activesupport/test/xml_mini/xml_mini_engine_test.rb
@@ -75,6 +75,11 @@ class XMLMiniEngineTest < ActiveSupport::TestCase
assert_equal({}, ActiveSupport::XmlMini.parse(""))
end
+ def test_parse_from_frozen_string
+ xml_string = "<root/>".freeze
+ assert_equal({ "root" => {} }, ActiveSupport::XmlMini.parse(xml_string))
+ end
+
def test_array_type_makes_an_array
assert_equal_rexml(<<-eoxml)
<blog>