From a6c2c86b24d53a02f4da229b8eab537ac57f06f5 Mon Sep 17 00:00:00 2001 From: ser Date: Tue, 2 Oct 2007 01:45:55 +0000 Subject: [PATCH] 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 --- lib/rexml/document.rb | 1 + 1 file changed, 1 insertion(+) 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