ruby-changes:10507
From: shyouhei <ko1@a...>
Date: Thu, 5 Feb 2009 09:03:00 +0900 (JST)
Subject: [ruby-changes:10507] Ruby:r22060 (ruby_1_8_6): merge revision(s) 20121:
shyouhei 2009-02-05 09:02:52 +0900 (Thu, 05 Feb 2009) New Revision: 22060 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22060 Log: merge revision(s) 20121: * lib/rexml/entity.rb (unnormalized): do not call document.record_entity_expansion if document is nil. see <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502535>. Thanks, Naohisa Goto. backported from trunk. * test/rexml/test_document.rb: ditto. Modified files: branches/ruby_1_8_6/ChangeLog branches/ruby_1_8_6/lib/rexml/entity.rb branches/ruby_1_8_6/test/rexml/test_document.rb branches/ruby_1_8_6/version.h Index: ruby_1_8_6/ChangeLog =================================================================== --- ruby_1_8_6/ChangeLog (revision 22059) +++ ruby_1_8_6/ChangeLog (revision 22060) @@ -1,3 +1,12 @@ +Thu Feb 5 09:02:18 2009 Shugo Maeda <shugo@r...> + + * lib/rexml/entity.rb (unnormalized): do not call + document.record_entity_expansion if document is nil. + see <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502535>. + Thanks, Naohisa Goto. backported from trunk. + + * test/rexml/test_document.rb: ditto. + Thu Feb 5 08:54:25 2009 Nobuyoshi Nakada <nobu@r...> * array.c (rb_ary_join): do not repeat self in a recursive array. Index: ruby_1_8_6/version.h =================================================================== --- ruby_1_8_6/version.h (revision 22059) +++ ruby_1_8_6/version.h (revision 22060) @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-02-05" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20090205 -#define RUBY_PATCHLEVEL 320 +#define RUBY_PATCHLEVEL 321 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 Index: ruby_1_8_6/lib/rexml/entity.rb =================================================================== --- ruby_1_8_6/lib/rexml/entity.rb (revision 22059) +++ ruby_1_8_6/lib/rexml/entity.rb (revision 22060) @@ -73,7 +73,7 @@ # all entities -- both %ent; and &ent; entities. This differs from # +value()+ in that +value+ only replaces %ent; entities. def unnormalized - document.record_entity_expansion + document.record_entity_expansion unless document.nil? v = value() return nil if v.nil? @unnormalized = Text::unnormalize(v, parent) Index: ruby_1_8_6/test/rexml/test_document.rb =================================================================== --- ruby_1_8_6/test/rexml/test_document.rb (revision 22059) +++ ruby_1_8_6/test/rexml/test_document.rb (revision 22060) @@ -35,6 +35,7 @@ <member> &a; &a2; +< </member> EOF @@ -53,7 +54,7 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/