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

ruby-changes:15584

From: shugo <ko1@a...>
Date: Sun, 25 Apr 2010 22:07:43 +0900 (JST)
Subject: [ruby-changes:15584] Ruby:r27490 (ruby_1_8): * lib/net/imap.rb (fetch_internal): do not quote message data item

shugo	2010-04-25 22:07:30 +0900 (Sun, 25 Apr 2010)

  New Revision: 27490

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

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

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/lib/net/imap.rb

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 27489)
+++ ruby_1_8/ChangeLog	(revision 27490)
@@ -1,3 +1,9 @@
+Sun Apr 25 22:06:25 2010  Shugo Maeda  <shugo@r...>
+
+	* lib/net/imap.rb (fetch_internal): do not quote message data item
+	  names.  Thanks, Eric Hodel.  [ruby-core:23508]  backported form
+	  trunk.
+
 Sun Apr 25 21:36:41 2010  Shugo Maeda  <shugo@r...>
 
 	* lib/net/imap (encode_utf7): encode & properly.  Thanks, Kengo
Index: ruby_1_8/lib/net/imap.rb
===================================================================
--- ruby_1_8/lib/net/imap.rb	(revision 27489)
+++ ruby_1_8/lib/net/imap.rb	(revision 27490)
@@ -1175,9 +1175,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/

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