aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-22 09:43:55 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-22 09:43:55 +0000
commitc8cb2598d12011634e22ecf3aa5003a31e3d57a3 (patch)
tree83cc1f2a31db0d2b2ad7f9084a67a52f9c3751ab
parent85147e903abe7af170cdc0ad6f9529a7bc2db132 (diff)
downloadruby-c8cb2598d12011634e22ecf3aa5003a31e3d57a3.tar.gz
* lib/net/imap.rb (move, uid_move): support the MOVE command defined
in RFC6851. Patch by ojab ojab. [ruby-core:68960] [Feature #11077] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/net/imap.rb14
2 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 04eead5db3..5aad5e9e04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Apr 22 18:36:50 2015 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/imap.rb (move, uid_move): support the MOVE command defined
+ in RFC6851. Patch by ojab ojab.
+ [ruby-core:68960] [Feature #11077]
+
Tue Apr 22 12:42:12 2015 Kazuki Tanaka <gogotanaka@ruby-lang.org>
* test/ruby/test_object.rb: add tests for Kernel#String and Kernel#Array.
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index a772c464ef..95e68ae9c1 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -853,6 +853,20 @@ module Net
copy_internal("UID COPY", set, mailbox)
end
+ # Sends a MOVE command to move the specified message(s) to the end
+ # of the specified destination +mailbox+. The +set+ parameter is
+ # a number, an array of numbers, or a Range object. The number is
+ # a message sequence number.
+ # The IMAP MOVE extension is described in [RFC-6851].
+ def move(set, mailbox)
+ copy_internal("MOVE", set, mailbox)
+ end
+
+ # Similar to #move(), but +set+ contains unique identifiers.
+ def uid_move(set, mailbox)
+ copy_internal("UID MOVE", set, mailbox)
+ end
+
# Sends a SORT command to sort messages in the mailbox.
# Returns an array of message sequence numbers. For example:
#