diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-25 12:58:19 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-25 12:58:19 +0000 |
commit | fcd05a98fbfca72f83ce84851ff5830817be1f59 (patch) | |
tree | cc2386ed05b805a8fb1285a96858211e6bfd7081 | |
parent | 3081e11166975ac0df1ef50fe65d319874f0b9fd (diff) |
* lib/net/imap.rb (fetch_internal): do not quote message data item
names. Thanks, Eric Hodel. [ruby-core:23508]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/net/imap.rb | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -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) |