diff options
Diffstat (limited to 'lib/rexml/element.rb')
-rw-r--r-- | lib/rexml/element.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb index 5991859a78..83e5f6e623 100644 --- a/lib/rexml/element.rb +++ b/lib/rexml/element.rb @@ -901,11 +901,11 @@ module REXML # #-> Yields <b/>, <c/>, <d/>, <b/>, <c/>, <d/> # XPath.each(doc.root, 'child::node()', &block) # #-> Yields <b/>, <c/>, <d/>, sean, <b/>, <c/>, <d/> - def each( xpath=nil, &block) + def each( xpath=nil ) XPath::each( @element, xpath ) {|e| yield e if e.kind_of? Element } end - def collect( xpath=nil, &block ) + def collect( xpath=nil ) collection = [] XPath::each( @element, xpath ) {|e| collection << yield(e) if e.kind_of?(Element) @@ -913,7 +913,7 @@ module REXML collection end - def inject( xpath=nil, initial=nil, &block ) + def inject( xpath=nil, initial=nil ) first = true XPath::each( @element, xpath ) {|e| if (e.kind_of? Element) |