From: Kouhei Sutou Date: 2013-01-03T17:46:16+09:00 Subject: Re: rexml.elements.each vs 1.9.3 documentation for same Hi, In <6d6542a4ef59a1f0c4bb61d35bff3909@ruby-forum.com> "rexml.elements.each vs 1.9.3 documentation for same" on Thu, 3 Jan 2013 14:26:56 +0900, Wesley Rishel wrote: > http://www.ruby-doc.org/stdlib-1.9.3/libdoc/rexml/rdoc/REXML/Elements.html#method-i-each > > includes the following example: > > doc = Document.new 'sean' > 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 > > However when I run it I get the results below. > > Am I doing something wrong? If not, is the documentation or the code > correct? Should I be reporting this somewhere? Thanks for your report. The sample code in the documentation is wrong. It should be doc.root.elements.each instead of doc.root.each . I've fixed it in trunk. Thanks, -- kou