summaryrefslogtreecommitdiff
path: root/lib/net/ftp.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-09-12 05:37:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-09-12 05:37:38 +0000
commitfbcc6dea0c86e7e4d087f1d4b2de19b211d16647 (patch)
tree68bde87194755712893e5efa4d7f9d2f5312df10 /lib/net/ftp.rb
parent9d823983dc3e88cb7775c78908a4bb5133ad88ac (diff)
matz: 1.6.0 final (hopufully)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/ftp.rb')
-rw-r--r--lib/net/ftp.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index ab10853..7383b00 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -276,7 +276,7 @@ module Net
end
def retrlines(cmd, callback = nil)
- if iterator?
+ if block_given?
callback = Proc.new
elsif not callback.is_a?(Proc)
callback = Proc.new {|line| print line, "\n"}
@@ -300,7 +300,7 @@ module Net
end
def storbinary(cmd, file, blocksize, rest_offset = nil, callback = nil)
- if iterator?
+ if block_given?
callback = Proc.new
end
use_callback = callback.is_a?(Proc)
@@ -319,7 +319,7 @@ module Net
end
def storlines(cmd, file, callback = nil)
- if iterator?
+ if block_given?
callback = Proc.new
end
use_callback = callback.is_a?(Proc)
@@ -342,7 +342,7 @@ module Net
def getbinaryfile(remotefile, localfile,
blocksize = DEFAULT_BLOCKSIZE, callback = nil)
- if iterator?
+ if block_given?
callback = Proc.new
end
use_callback = callback.is_a?(Proc)
@@ -365,7 +365,7 @@ module Net
end
def gettextfile(remotefile, localfile, callback = nil)
- if iterator?
+ if block_given?
callback = Proc.new
end
use_callback = callback.is_a?(Proc)
@@ -383,7 +383,7 @@ module Net
def putbinaryfile(localfile, remotefile,
blocksize = DEFAULT_BLOCKSIZE, callback = nil)
- if iterator?
+ if block_given?
callback = Proc.new
end
use_callback = callback.is_a?(Proc)
@@ -404,7 +404,7 @@ module Net
end
def puttextfile(localfile, remotefile, callback = nil)
- if iterator?
+ if block_given?
callback = Proc.new
end
use_callback = callback.is_a?(Proc)