From 7216e335999bd5caa87e3d36cd37a70383e990d0 Mon Sep 17 00:00:00 2001 From: shugo Date: Thu, 6 Nov 2008 17:03:40 +0000 Subject: * lib/rexml/entity.rb (unnormalized): do not call document.record_entity_expansion if document is nil. see . Thanks, Naohisa Goto. * test/rexml/test_document.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rexml/test_document.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb index 5207b42d7..0261e80b7 100644 --- a/test/rexml/test_document.rb +++ b/test/rexml/test_document.rb @@ -35,6 +35,7 @@ EOF &a; &a2; +< EOF @@ -53,7 +54,7 @@ EOF REXML::Document.entity_expansion_limit = 4 doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION) - assert_equal("\na\na a\n", doc.root.children.first.value) + assert_equal("\na\na a\n<\n", doc.root.children.first.value) REXML::Document.entity_expansion_limit = 3 doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION) assert_raise(RuntimeError) do -- cgit