mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/ftp.rb (Net::FTP#initialize): @sock = nil.
* lib/net/ftp.rb (Net::FTP#binary=): send command only when socket is open. [ruby-dev:39548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8252adfd5a
commit
249569fd8e
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Tue Oct 27 22:46:44 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/net/ftp.rb (Net::FTP#initialize): @sock = nil.
|
||||||
|
|
||||||
|
* lib/net/ftp.rb (Net::FTP#binary=): send command only when
|
||||||
|
socket is open. [ruby-dev:39548]
|
||||||
|
|
||||||
Tue Oct 27 22:22:38 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Oct 27 22:22:38 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/stringio/stringio.c (Init_stringio): added read_nonblock and
|
* ext/stringio/stringio.c (Init_stringio): added read_nonblock and
|
||||||
|
|
|
@ -132,6 +132,7 @@ module Net
|
||||||
@passive = false
|
@passive = false
|
||||||
@debug_mode = false
|
@debug_mode = false
|
||||||
@resume = false
|
@resume = false
|
||||||
|
@sock = nil
|
||||||
if host
|
if host
|
||||||
connect(host)
|
connect(host)
|
||||||
if user
|
if user
|
||||||
|
@ -143,7 +144,7 @@ module Net
|
||||||
def binary=(newmode)
|
def binary=(newmode)
|
||||||
if newmode != @binary
|
if newmode != @binary
|
||||||
@binary = newmode
|
@binary = newmode
|
||||||
@binary ? voidcmd("TYPE I") : voidcmd("TYPE A")
|
@binary ? voidcmd("TYPE I") : voidcmd("TYPE A") unless closed?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue