diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-05 07:37:47 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-05 07:37:47 +0000 |
commit | c3749b6a6da86243ca16ed058216114e71c184f3 (patch) | |
tree | db06109ff283e6a9abc0ffa7f905598aa106b61d /lib/net/ftp.rb | |
parent | 0e68c46e2dc4ae6603f9dd53a2048c6d8bddea10 (diff) | |
download | ruby-c3749b6a6da86243ca16ed058216114e71c184f3.tar.gz |
* 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/net/ftp.rb')
-rw-r--r-- | lib/net/ftp.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 |