summaryrefslogtreecommitdiff
path: root/lib/rexml
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-05 07:37:47 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-05 07:37:47 +0000
commitc3749b6a6da86243ca16ed058216114e71c184f3 (patch)
treedb06109ff283e6a9abc0ffa7f905598aa106b61d /lib/rexml
parent0e68c46e2dc4ae6603f9dd53a2048c6d8bddea10 (diff)
* ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb, lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb, lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb, lib/rinda/tuplespace.rb, lib/rss/maker/base.rb, lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb, lib/shell/command-processor.rb, lib/shell/process-controller.rb, lib/shell/system-command.rb, lib/uri/common.rb: remove unused block arguments to avoid creating Proc objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r--lib/rexml/element.rb6
-rw-r--r--lib/rexml/light/node.rb2
2 files changed, 4 insertions, 4 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)
diff --git a/lib/rexml/light/node.rb b/lib/rexml/light/node.rb
index 0a896c83dc..b33f78f7ce 100644
--- a/lib/rexml/light/node.rb
+++ b/lib/rexml/light/node.rb
@@ -40,7 +40,7 @@ module REXML
end
end
- def each( &block )
+ def each
size.times { |x| yield( at(x+4) ) }
end