summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-03 08:44:09 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-03 08:44:09 +0000
commitece67a0a12aaffc083963b606a5bd09feb5cf68a (patch)
treeeb40df669a76832c3a29be906847544eac636452 /lib
parent3e028faf7c0a5bf2ac491b4368edc75b6980489b (diff)
* lib/rexml/element.rb (REXML::Elements#each): Add missing
"elements" in document. [ruby-talk:402713] Reported by Wesley Rishel. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rexml/element.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb
index 83e5f6e..f982599 100644
--- a/lib/rexml/element.rb
+++ b/lib/rexml/element.rb
@@ -895,11 +895,11 @@ module REXML
# 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 }