From 412cd56766a4822c48117a16d79303d3d915b28a Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 12 Oct 2019 12:07:15 +0900 Subject: Import REXML 3.2.3 (#2548) --- NEWS | 5 +++++ lib/rexml/rexml.rb | 2 +- lib/rexml/xmldecl.rb | 1 + test/rexml/test_xml_declaration.rb | 6 ++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7bc0f35923..9a1c0275c2 100644 --- a/NEWS +++ b/NEWS @@ -401,6 +401,11 @@ Reline:: * New stdlib that is compatible with readline stdlib by pure Ruby and also has a multiline mode. +REXML:: + + * Upgrade to 3.2.3. + See https://github.com/ruby/rexml/blob/master/NEWS.md. + RSS:: * Upgrade to RSS 0.2.8. diff --git a/lib/rexml/rexml.rb b/lib/rexml/rexml.rb index c91846b461..944d88a869 100644 --- a/lib/rexml/rexml.rb +++ b/lib/rexml/rexml.rb @@ -24,7 +24,7 @@ module REXML COPYRIGHT = "Copyright © 2001-2008 Sean Russell " DATE = "2008/019" - VERSION = "3.2.2" + VERSION = "3.2.3" REVISION = "" Copyright = COPYRIGHT diff --git a/lib/rexml/xmldecl.rb b/lib/rexml/xmldecl.rb index 89c0747d49..d19407cefd 100644 --- a/lib/rexml/xmldecl.rb +++ b/lib/rexml/xmldecl.rb @@ -26,6 +26,7 @@ module REXML self.encoding = version.encoding @writeencoding = version.writeencoding @standalone = version.standalone + @writethis = version.writethis else super() @version = version diff --git a/test/rexml/test_xml_declaration.rb b/test/rexml/test_xml_declaration.rb index 1d5a6d312f..da7076126e 100644 --- a/test/rexml/test_xml_declaration.rb +++ b/test/rexml/test_xml_declaration.rb @@ -38,5 +38,11 @@ module REXMLTests "encoding=\"UTF-8\" standalone=\"yes\"?>", @xml_declaration.to_s) end + + def test_is_writethis_attribute_copied_by_clone + assert_equal(true, @xml_declaration.clone.writethis) + @xml_declaration.nowrite + assert_equal(false, @xml_declaration.clone.writethis) + end end end -- cgit v1.2.3