aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSutou Kouhei <kou@cozmixng.org>2019-10-12 12:07:15 +0900
committerGitHub <noreply@github.com>2019-10-12 12:07:15 +0900
commit412cd56766a4822c48117a16d79303d3d915b28a (patch)
tree536900f38bfbb1e687262e723405288d2e8aa6bb
parentc866663784ea5a8f16e7fe5127127fb46ae90e6e (diff)
downloadruby-412cd56766a4822c48117a16d79303d3d915b28a.tar.gz
Import REXML 3.2.3 (#2548)
-rw-r--r--NEWS5
-rw-r--r--lib/rexml/rexml.rb2
-rw-r--r--lib/rexml/xmldecl.rb1
-rw-r--r--test/rexml/test_xml_declaration.rb6
4 files changed, 13 insertions, 1 deletions
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 <ser@germane-software.com>"
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