summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 06:55:06 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 06:55:06 +0000
commit8129a8dfbdac69ac5879aedeec45ff7c444954ee (patch)
treed9a99ad6de9c249511b3b0a6cdc6eb6759d88143 /lib
parentae0b6068308814274903466ef0788161798b3265 (diff)
* lib/rexml/parent.rb (REXML::Parent#delete): return the deleted node
because the rdoc of REXML::Element#delete_element says it returns "the element that was removed." git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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)