summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-05 00:03:56 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-05 00:03:56 +0000
commit1323a6e45c5128c864a074483f67dec43f84ba00 (patch)
tree095fae57332880113f86cf531c9fc58416b20a57 /lib
parentd754218777149f842d406495d331854026068e62 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rexml/entity.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/entity.rb b/lib/rexml/entity.rb
index 94e6d3ff1b..7e9b4e5e1a 100644
--- a/lib/rexml/entity.rb
+++ b/lib/rexml/entity.rb
@@ -73,7 +73,7 @@ module REXML
# 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)