net-imap 0.4.20 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/net/imap/sequence_set.rb +9 -4
- data/lib/net/imap.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab1b84ea6eac7b0d57793127bc365c79b63eb9564386427eb66cca91cf5df294
|
4
|
+
data.tar.gz: 3040f462d83f7a364fed076a730d5a9ba0512ea52ab0368765befb0e2d700dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7565d3002323cdaad204bbd5eceb0b64d265e61daa41d9e3c61b8ea12ff3bbbb5f5e62298138f48a96c32553b1fcf3c6dcab7cae5776a22a521abe77b6e153c
|
7
|
+
data.tar.gz: 73b9338a55d33e703c86217ee80ee7486e92dbf67b232c152d4115a89a76c4f384c39e34888d24ec8cf389af1d67ca1d1d84e3edc676ecc501495cf6b66d7dfe
|
@@ -676,7 +676,7 @@ module Net
|
|
676
676
|
#
|
677
677
|
# <tt>(seqset ^ other)</tt> is equivalent to <tt>((seqset | other) -
|
678
678
|
# (seqset & other))</tt>.
|
679
|
-
def ^(other) remain_frozen (
|
679
|
+
def ^(other) remain_frozen (dup | other).subtract(self & other) end
|
680
680
|
alias xor :^
|
681
681
|
|
682
682
|
# :call-seq:
|
@@ -1245,14 +1245,18 @@ module Net
|
|
1245
1245
|
def slice_range(range)
|
1246
1246
|
first = range.begin || 0
|
1247
1247
|
last = range.end || -1
|
1248
|
-
|
1248
|
+
if range.exclude_end?
|
1249
|
+
return remain_frozen_empty if last.zero?
|
1250
|
+
last -= 1 if range.end && last != STAR_INT
|
1251
|
+
end
|
1249
1252
|
if (first * last).positive? && last < first
|
1250
|
-
|
1253
|
+
remain_frozen_empty
|
1251
1254
|
elsif (min = at(first))
|
1252
1255
|
max = at(last)
|
1256
|
+
max = :* if max.nil?
|
1253
1257
|
if max == :* then self & (min..)
|
1254
1258
|
elsif min <= max then self & (min..max)
|
1255
|
-
else
|
1259
|
+
else remain_frozen_empty
|
1256
1260
|
end
|
1257
1261
|
end
|
1258
1262
|
end
|
@@ -1380,6 +1384,7 @@ module Net
|
|
1380
1384
|
private
|
1381
1385
|
|
1382
1386
|
def remain_frozen(set) frozen? ? set.freeze : set end
|
1387
|
+
def remain_frozen_empty; frozen? ? SequenceSet.empty : SequenceSet.new end
|
1383
1388
|
|
1384
1389
|
# frozen clones are shallow copied
|
1385
1390
|
def initialize_clone(other)
|
data/lib/net/imap.rb
CHANGED
@@ -761,7 +761,7 @@ module Net
|
|
761
761
|
# * {IMAP URLAUTH Authorization Mechanism Registry}[https://www.iana.org/assignments/urlauth-authorization-mechanism-registry/urlauth-authorization-mechanism-registry.xhtml]
|
762
762
|
#
|
763
763
|
class IMAP < Protocol
|
764
|
-
VERSION = "0.4.
|
764
|
+
VERSION = "0.4.21"
|
765
765
|
|
766
766
|
# Aliases for supported capabilities, to be used with the #enable command.
|
767
767
|
ENABLE_ALIASES = {
|