diff --git a/ChangeLog b/ChangeLog index ee66d55415..629765504a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Oct 27 22:46:44 2009 NARUSE, Yui + + * 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 * ext/stringio/stringio.c (Init_stringio): added read_nonblock and diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 52bd37595d..239bd3cbc6 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -132,6 +132,7 @@ module Net @passive = false @debug_mode = false @resume = false + @sock = nil if host connect(host) if user @@ -143,7 +144,7 @@ module Net def binary=(newmode) if newmode != @binary @binary = newmode - @binary ? voidcmd("TYPE I") : voidcmd("TYPE A") + @binary ? voidcmd("TYPE I") : voidcmd("TYPE A") unless closed? end end