summaryrefslogtreecommitdiffstats
path: root/lib/rexml/document.rb
diff options
context:
space:
mode:
authorser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-02 01:45:55 +0000
committerser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-02 01:45:55 +0000
commit3f5c25b733bad4e35966525089c690ede0424706 (patch)
tree6bee1ee480ce1f5982ccbba10fe2d1755c428d1c /lib/rexml/document.rb
parent74e14343cfd8a2d7548c452c64c52bbb70d1a417 (diff)
downloadruby-3f5c25b733bad4e35966525089c690ede0424706.tar.gz
ruby-3f5c25b733bad4e35966525089c690ede0424706.tar.xz
ruby-3f5c25b733bad4e35966525089c690ede0424706.zip
r1364@bean: ser | 2007-10-01 21:24:31 -0400
r1344@bean: ser | 2007-07-28 09:37:44 -0400 Fixes ticket:99, and adds Henrik's unit test (with minor modifications) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/document.rb')
-rw-r--r--lib/rexml/document.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb
index 558b5d731..2b6ee2408 100644
--- a/lib/rexml/document.rb
+++ b/lib/rexml/document.rb
@@ -66,6 +66,7 @@ module REXML
def add( child )
if child.kind_of? XMLDecl
@children.unshift child
+ child.parent = self
elsif child.kind_of? DocType
# Find first Element or DocType node and insert the decl right
# before it. If there is no such node, just insert the child at the