Skip to content

Commit

Permalink
* lib/rexml/parent.rb (REXML::Parent#delete): return the deleted node
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
mame committed Jan 31, 2010
1 parent ae0b606 commit 8129a8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ChangeLog
@@ -1,6 +1,12 @@
Sun Jan 31 15:46:37 2010 Yusuke Endoh <mame@tsg.ne.jp>

* 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."

Sun Jan 31 14:33:00 2010 James Edward Gray II <jeg2@ruby-lang.org>

* A bug fix for deleting blank Table rows from Andy Hartford.
* lib/csv.rb: A bug fix for deleting blank Table rows from Andy Hartford.

Sun Jan 31 13:31:43 2010 wanabe <s.wanabe@gmail.com>

Expand Down
1 change: 1 addition & 0 deletions lib/rexml/parent.rb
Expand Up @@ -34,6 +34,7 @@ def delete( object )
found = false
@children.delete_if {|c| c.equal?(object) and found = true }
object.parent = nil if found
found ? object : nil
end

def each(&block)
Expand Down

0 comments on commit 8129a8d

Please sign in to comment.