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/net/ftp.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/net/ftp.rb') diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 149fc6adc1..9abfbae421 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -493,7 +493,7 @@ module Net # +file+ to the server. If the optional block is given, it also passes it # the data, in chunks of +blocksize+ characters. # - def storbinary(cmd, file, blocksize, rest_offset = nil, &block) # :yield: data + def storbinary(cmd, file, blocksize, rest_offset = nil) # :yield: data if rest_offset file.seek(rest_offset, IO::SEEK_SET) end @@ -504,7 +504,7 @@ module Net buf = file.read(blocksize) break if buf == nil conn.write(buf) - yield(buf) if block + yield(buf) if block_given? end conn.close voidresp @@ -525,7 +525,7 @@ module Net # named +file+ to the server, one line at a time. If the optional block is # given, it also passes it the lines. # - def storlines(cmd, file, &block) # :yield: line + def storlines(cmd, file) # :yield: line synchronize do with_binary(false) do conn = transfercmd(cmd) @@ -536,7 +536,7 @@ module Net buf = buf.chomp + CRLF end conn.write(buf) - yield(buf) if block + yield(buf) if block_given? end conn.close voidresp -- cgit v1.2.3