summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-06 17:03:40 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-06 17:03:40 +0000
commit7216e335999bd5caa87e3d36cd37a70383e990d0 (patch)
tree9d9e6646945d978eb192afad6791c15100c9fd56 /lib
parent53fe8fc75327837b0673a89b7a8e49af2cc8fc53 (diff)
downloadruby-7216e335999bd5caa87e3d36cd37a70383e990d0.tar.gz
ruby-7216e335999bd5caa87e3d36cd37a70383e990d0.tar.xz
ruby-7216e335999bd5caa87e3d36cd37a70383e990d0.zip
* 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. * test/rexml/test_document.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20120 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 a4093b680..d2f27ecd4 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)