From 62b1b1722165547bb7d0d8e0a3221f43b9de63d9 Mon Sep 17 00:00:00 2001 From: Josh Nussbaum Date: Thu, 20 Apr 2017 16:31:50 -0400 Subject: Fixes Hash.from_xml with frozen strings for all backends --- activesupport/test/xml_mini/xml_mini_engine_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport/test/xml_mini/xml_mini_engine_test.rb') 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 = "".freeze + assert_equal({ "root" => {} }, ActiveSupport::XmlMini.parse(xml_string)) + end + def test_array_type_makes_an_array assert_equal_rexml(<<-eoxml) -- cgit v1.2.3