aboutsummaryrefslogtreecommitdiffstats
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
parentae0b6068308814274903466ef0788161798b3265 (diff)
downloadruby-8129a8dfbdac69ac5879aedeec45ff7c444954ee.tar.gz
* 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
-rw-r--r--ChangeLog8
-rw-r--r--lib/rexml/parent.rb1
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 63b32541bb..b2eb657a7f 100644
--- a/ChangeLog
+++ b/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>
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)