[前][次][番号順一覧][スレッド一覧]

ruby-changes:26630

From: kou <ko1@a...>
Date: Thu, 3 Jan 2013 17:44:20 +0900 (JST)
Subject: [ruby-changes:26630] kou:r38681 (trunk): * lib/rexml/element.rb (REXML::Elements#each): Add missing

kou	2013-01-03 17:44:09 +0900 (Thu, 03 Jan 2013)

  New Revision: 38681

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38681

  Log:
    * lib/rexml/element.rb (REXML::Elements#each): Add missing
      "elements" in document. [ruby-talk:402713]
      Reported by Wesley Rishel. Thanks!!!

  Modified files:
    trunk/ChangeLog
    trunk/lib/rexml/element.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38680)
+++ ChangeLog	(revision 38681)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jan  3 17:42:32 2013  Kouhei Sutou  <kou@c...>
+
+	* lib/rexml/element.rb (REXML::Elements#each): Add missing
+	  "elements" in document. [ruby-talk:402713]
+	  Reported by Wesley Rishel. Thanks!!!
+
 Thu Jan  3 15:13:00 2013  Zachary Scott  <zachary@z...>
 
 	* ext/psych/lib/psych.rb (Psych.load): Return value of
Index: lib/rexml/element.rb
===================================================================
--- lib/rexml/element.rb	(revision 38680)
+++ lib/rexml/element.rb	(revision 38681)
@@ -895,11 +895,11 @@ module REXML https://github.com/ruby/ruby/blob/trunk/lib/rexml/element.rb#L895
     #   that XPaths are automatically filtered for Elements, so that
     #   non-Element children will not be yielded
     #  doc = Document.new '<a><b/><c/><d/>sean<b/><c/><d/></a>'
-    #  doc.root.each {|e|p e}       #-> Yields b, c, d, b, c, d elements
-    #  doc.root.each('b') {|e|p e}  #-> Yields b, b elements
-    #  doc.root.each('child::node()')  {|e|p e}
+    #  doc.root.elements.each {|e|p e}       #-> Yields b, c, d, b, c, d elements
+    #  doc.root.elements.each('b') {|e|p e}  #-> Yields b, b elements
+    #  doc.root.elements.each('child::node()')  {|e|p e}
     #  #-> Yields <b/>, <c/>, <d/>, <b/>, <c/>, <d/>
-    #  XPath.each(doc.root, 'child::node()', &block)
+    #  XPath.elements.each(doc.root, 'child::node()', &block)
     #  #-> Yields <b/>, <c/>, <d/>, sean, <b/>, <c/>, <d/>
     def each( xpath=nil )
       XPath::each( @element, xpath ) {|e| yield e if e.kind_of? Element }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]