ruby-changes:13726
From: naruse <ko1@a...>
Date: Tue, 27 Oct 2009 22:51:01 +0900 (JST)
Subject: [ruby-changes:13726] Ruby:r25518 (trunk): * lib/net/ftp.rb (Net::FTP#initialize): @sock = nil.
naruse 2009-10-27 22:50:42 +0900 (Tue, 27 Oct 2009) New Revision: 25518 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25518 Log: * 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] Modified files: trunk/ChangeLog trunk/lib/net/ftp.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 25517) +++ ChangeLog (revision 25518) @@ -1,3 +1,10 @@ +Tue Oct 27 22:46:44 2009 NARUSE, Yui <naruse@r...> + + * 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@r...> * ext/stringio/stringio.c (Init_stringio): added read_nonblock and Index: lib/net/ftp.rb =================================================================== --- lib/net/ftp.rb (revision 25517) +++ lib/net/ftp.rb (revision 25518) @@ -132,6 +132,7 @@ @passive = false @debug_mode = false @resume = false + @sock = nil if host connect(host) if user @@ -143,7 +144,7 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/