summaryrefslogtreecommitdiff
path: root/lib/rexml
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
commita6c2c86b24d53a02f4da229b8eab537ac57f06f5 (patch)
tree6bee1ee480ce1f5982ccbba10fe2d1755c428d1c /lib/rexml
parentefe8edf32cff09aa59cd3d2a8338e3531c80caea (diff)
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-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 558b5d731a..2b6ee24087 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