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

ruby-changes:15583

From: shugo <ko1@a...>
Date: Sun, 25 Apr 2010 21:58:36 +0900 (JST)
Subject: [ruby-changes:15583] Ruby:r27489 (trunk): * lib/net/imap.rb (fetch_internal): do not quote message data item

shugo	2010-04-25 21:58:19 +0900 (Sun, 25 Apr 2010)

  New Revision: 27489

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

  Log:
    * lib/net/imap.rb (fetch_internal): do not quote message data item
      names.  Thanks, Eric Hodel.  [ruby-core:23508]

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/imap.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27488)
+++ ChangeLog	(revision 27489)
@@ -1,3 +1,8 @@
+Sun Apr 25 21:56:49 2010  Shugo Maeda  <shugo@r...>
+
+	* lib/net/imap.rb (fetch_internal): do not quote message data item
+	  names.  Thanks, Eric Hodel.  [ruby-core:23508]
+
 Sun Apr 25 15:59:02 2010  Tadayoshi Funaba  <tadf@d...>
 
 	* lib/cmath.rb: reverted experimental r23900.
Index: lib/net/imap.rb
===================================================================
--- lib/net/imap.rb	(revision 27488)
+++ lib/net/imap.rb	(revision 27489)
@@ -1282,9 +1282,15 @@
     end
 
     def fetch_internal(cmd, set, attr)
-      if attr.instance_of?(String)
+      case attr
+      when String then
         attr = RawData.new(attr)
+      when Array then
+        attr = attr.map { |arg|
+          arg.is_a?(String) ? RawData.new(arg) : arg
+        }
       end
+
       synchronize do
         @responses.delete("FETCH")
         send_command(cmd, MessageSet.new(set), attr)

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

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