aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-31 07:36:31 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-31 07:36:31 +0000
commita87c88bcd42537bd59db1f30d962ca98ae703414 (patch)
tree28abce84a73489d6367d250a3c1f9da4647c89e6
parent8ed7d220f3d284f8af2bd014c39558ecddf3caec (diff)
downloadruby-a87c88bcd42537bd59db1f30d962ca98ae703414.tar.gz
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/imap.rb6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a53ec6906c..23008655d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Oct 31 16:33:46 2014 Akinori MUSHA <knu@iDaemons.org>
+
+ * 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@ruby-lang.org>
* common.mk (.unicode-tables.time): needs Unicode files always,
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 85644f388c..7bd453f864 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -788,8 +788,10 @@ module Net
# +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}>, \\