summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/imap.rb8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e5e35eac32..a7ab67f432 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Apr 25 21:56:49 2010 Shugo Maeda <shugo@ruby-lang.org>
+
+ * 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@dotrb.org>
* lib/cmath.rb: reverted experimental r23900.
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 6f1a578144..46e8f201a1 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -1282,9 +1282,15 @@ module Net
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)