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

ruby-changes:36126

From: knu <ko1@a...>
Date: Fri, 31 Oct 2014 16:36:45 +0900 (JST)
Subject: [ruby-changes:36126] knu:r48207 (trunk): Document that Net::IMAP#fetch will return nil instead of an emtpy array.

knu	2014-10-31 16:36:31 +0900 (Fri, 31 Oct 2014)

  New Revision: 48207

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

  Log:
    Document that Net::IMAP#fetch will return nil instead of an emtpy array.
    
    * lib/net/imap.rb (Net::IMAP#fetch): [DOC] Document that
      Net::IMAP#fetch will return nil instead of an emtpy array.

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/imap.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48206)
+++ ChangeLog	(revision 48207)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Oct 31 16:33:46 2014  Akinori MUSHA  <knu@i...>
+
+	* lib/net/imap.rb (Net::IMAP#fetch): [DOC] Document that
+	  Net::IMAP#fetch will return nil instead of an emtpy array.
+
 Fri Oct 31 12:54:43 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* common.mk (.unicode-tables.time): needs Unicode files always,
Index: lib/net/imap.rb
===================================================================
--- lib/net/imap.rb	(revision 48206)
+++ lib/net/imap.rb	(revision 48207)
@@ -788,8 +788,10 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/imap.rb#L788
     # +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:
+    # The return value is an array of Net::IMAP::FetchData or nil
+    # (instead of an empty array) if there is no matching message.
+    #
+    # For example:
     #
     #   p imap.fetch(6..8, "UID")
     #   #=> [#<Net::IMAP::FetchData seqno=6, attr={"UID"=>98}>, \\

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

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