From 9620b20227a60b30ed405f7fd3299f7567fc61ad Mon Sep 17 00:00:00 2001 From: shugo Date: Wed, 3 Jul 2002 04:59:24 +0000 Subject: * lib/net/ftp.rb (getbinaryfile): the second argument (localfile) is now optional. * lib/net/ftp.rb (gettextfile): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/ftp.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/net') diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index ff915fcd2a..da380fcdb4 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -327,7 +327,7 @@ module Net end end - def getbinaryfile(remotefile, localfile, + def getbinaryfile(remotefile, localfile = File.basename(remotefile), blocksize = DEFAULT_BLOCKSIZE, &block) if @resume rest_offset = File.size?(localfile) @@ -347,7 +347,7 @@ module Net end end - def gettextfile(remotefile, localfile, &block) + def gettextfile(remotefile, localfile = File.basename(remotefile), &block) f = open(localfile, "w") begin retrlines("RETR " + remotefile) do |line| -- cgit v1.2.3