[前][次][番号順一覧][スレッド一覧]

ruby-changes:31492

From: zzak <ko1@a...>
Date: Fri, 8 Nov 2013 02:38:23 +0900 (JST)
Subject: [ruby-changes:31492] zzak:r43571 (trunk): * lib/net/ftp.rb: [DOC] Document Net::FTP.mdtm and .set_socket and fix

zzak	2013-11-08 02:38:18 +0900 (Fri, 08 Nov 2013)

  New Revision: 43571

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43571

  Log:
    * lib/net/ftp.rb: [DOC] Document Net::FTP.mdtm and .set_socket and fix
      spelling typo, based on patch by @artfuldodger [Fixes GH-426]
      https://github.com/ruby/ruby/pull/426

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/ftp.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43570)
+++ ChangeLog	(revision 43571)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Nov  8 02:34:20 2013  Zachary Scott  <e@z...>
+
+	* lib/net/ftp.rb: [DOC] Document Net::FTP.mdtm and .set_socket and fix
+	  spelling typo, based on patch by @artfuldodger [Fixes GH-426]
+	  https://github.com/ruby/ruby/pull/426
+
 Fri Nov  8 02:14:37 2013  Zachary Scott  <e@z...>
 
 	* array.c: [DOC] Add note about negative indices in Array overview
Index: lib/net/ftp.rb
===================================================================
--- lib/net/ftp.rb	(revision 43570)
+++ lib/net/ftp.rb	(revision 43571)
@@ -251,8 +251,9 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L251
     end
 
     #
-    # WRITEME or make private
+    # Set the socket used to connect to the FTP server.
     #
+    # May raise FTPReplyError if +get_greeting+ is false.
     def set_socket(sock, get_greeting = true)
       synchronize do
         @sock = sock
@@ -310,7 +311,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L311
     end
     private :getmultiline
 
-    # Recieves a response from the destination host.
+    # Receives a response from the destination host.
     #
     # Returns the response code or raises FTPTempError, FTPPermError, or
     # FTPProtoError
@@ -330,7 +331,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L331
     end
     private :getresp
 
-    # Recieves a response.
+    # Receives a response.
     #
     # Raises FTPReplyError if the first position of the response code is not
     # equal 2.
@@ -897,7 +898,10 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L898
     end
 
     #
-    # Issues the MDTM command.  TODO: more info.
+    # Returns the raw last modification time of the (remote) file in the format
+    # "YYYYMMDDhhmmss" (MDTM command).
+    #
+    # Use +mtime+ if you want a parsed Time instance.
     #
     def mdtm(filename)
       resp = sendcmd("MDTM " + filename)
@@ -1114,5 +1118,3 @@ end https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L1118
 
 # Documentation comments:
 #  - sourced from pickaxe and nutshell, with improvements (hopefully)
-#  - three methods should be private (search WRITEME)
-#  - two methods need more information (search TODO)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]