summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rexml/parent.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rexml/parent.rb b/lib/rexml/parent.rb
index 7ed1761654..0a9f805109 100644
--- a/lib/rexml/parent.rb
+++ b/lib/rexml/parent.rb
@@ -34,6 +34,7 @@ module REXML
found = false
@children.delete_if {|c| c.equal?(object) and found = true }
object.parent = nil if found
+ found ? object : nil
end
def each(&block)