From c3749b6a6da86243ca16ed058216114e71c184f3 Mon Sep 17 00:00:00 2001 From: ktsj Date: Sat, 5 Nov 2011 07:37:47 +0000 Subject: * 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 --- lib/rexml/element.rb | 6 +++--- lib/rexml/light/node.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/rexml') 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 , , , , , # XPath.each(doc.root, 'child::node()', &block) # #-> Yields , , , sean, , , - 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 -- cgit v1.2.3