1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
mame 2010-01-31 06:55:06 +00:00
parent ae0b606830
commit 8129a8dfbd
2 changed files with 8 additions and 1 deletions

View file

@ -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)