diff options
| author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-07-03 04:59:24 +0000 |
|---|---|---|
| committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-07-03 04:59:24 +0000 |
| commit | fcaccdec88e5b1a16b7ab44c7481c7aa30932636 (patch) | |
| tree | ac04b386f78441fb1b7ff6bee0e582e51420ab0c /lib/net | |
| parent | c7ac35deb83c6fc93c76016958512308fcf989bb (diff) | |
| download | ruby-fcaccdec88e5b1a16b7ab44c7481c7aa30932636.tar.gz ruby-fcaccdec88e5b1a16b7ab44c7481c7aa30932636.tar.xz ruby-fcaccdec88e5b1a16b7ab44c7481c7aa30932636.zip | |
* lib/net/ftp.rb (getbinaryfile): the second argument (localfile)
is now optional.
* lib/net/ftp.rb (gettextfile): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
| -rw-r--r-- | lib/net/ftp.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index ff915fcd2..da380fcdb 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| |
