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

ruby-changes:34431

From: knu <ko1@a...>
Date: Mon, 23 Jun 2014 17:46:21 +0900 (JST)
Subject: [ruby-changes:34431] knu:r46512 (trunk): * lib/net/imap.rb (Net::IMAP#fetch): [DOC] Describe how a range in

knu	2014-06-23 17:46:11 +0900 (Mon, 23 Jun 2014)

  New Revision: 46512

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

  Log:
    * lib/net/imap.rb (Net::IMAP#fetch): [DOC] Describe how a range in
      +set+ is interpreted, and mention -1 which can be used for '*'.

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/imap.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46511)
+++ ChangeLog	(revision 46512)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun 23 17:33:11 2014  Akinori MUSHA  <knu@i...>
+
+	* lib/net/imap.rb (Net::IMAP#fetch): [DOC] Describe how a range in
+	  +set+ is interpreted, and mention -1 which can be used for '*'.
+
 Mon Jun 23 16:22:50 2014  URABE Shyouhei  <shyouhei@r...>
 
 	* include/ruby/ruby.h (struct RHash): no longer. [Feature #9889]
Index: lib/net/imap.rb
===================================================================
--- lib/net/imap.rb	(revision 46511)
+++ lib/net/imap.rb	(revision 46512)
@@ -774,12 +774,22 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/imap.rb#L774
     end
 
     # Sends a FETCH command to retrieve data associated with a message
-    # in the mailbox. The +set+ parameter is a number, an array of
-    # numbers, or a Range object. The number is a message sequence
-    # number.  +attr+ is a list of attributes to fetch; see the
-    # documentation for Net::IMAP::FetchData for a list of valid
-    # attributes.
-    # The return value is an array of Net::IMAP::FetchData. For example:
+    # in the mailbox.
+    #
+    # The +set+ parameter is a number or a range between two numbers,
+    # or an array of those.  The number is a message sequence number,
+    # where -1 repesents a '*' for use in range notation like 100..-1
+    # being interpreted as '100:*'.  Beware that the +exclude_end?+
+    # property of a Range object is ignored, and the contents of a
+    # range are independent of the order of the range endpoints as per
+    # the protocol specification, so 1...5, 5..1 and 5...1 are all
+    # equivalent to 1..5.
+    #
+    # +attr+ is a list of attributes to fetch; see the documentation
+    # for Net::IMAP::FetchData for a list of valid attributes.
+    #
+    # The return value is an array of Net::IMAP::FetchData. For
+    # example:
     #
     #   p imap.fetch(6..8, "UID")
     #   #=> [#<Net::IMAP::FetchData seqno=6, attr={"UID"=>98}>, \\
@@ -3769,4 +3779,3 @@ EOF https://github.com/ruby/ruby/blob/trunk/lib/net/imap.rb#L3779
     imap.disconnect
   end
 end
-

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

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