net-imap 0.6.1 → 0.6.2
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 +10 -1
- data/lib/net/imap.rb +2 -2
- 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: bc6f6d65e2f5092b38316ed4d381551838dd412a5b376c06359225e8f53a020c
|
|
4
|
+
data.tar.gz: d5daf47c70a868650687f7db3d1a1e074555a634708c16792e19f1cb53f8cc83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1aeb682e73a666591079aac75c4325f22079dfbf61dbe71df135059b9087890633c31fd036e61757a217f1b1ff3e1d3771801a7ec6f3817646a0f8d2c0896386
|
|
7
|
+
data.tar.gz: 8cd118d9943b83010dd2f4916ab7641e120743991d3bc06062c4eb286098d1af8af05d86854b3e44235a0b3263b801db1cf9a7d64ac3140d89eda1aca086e6cd
|
|
@@ -1098,8 +1098,9 @@ module Net
|
|
|
1098
1098
|
# Related: #delete, #delete_at, #subtract, #difference, #disjoint?
|
|
1099
1099
|
def delete?(element)
|
|
1100
1100
|
modifying! # short-circuit before import_minmax
|
|
1101
|
+
element = input_try_convert(element)
|
|
1101
1102
|
minmax = import_minmax element
|
|
1102
|
-
if
|
|
1103
|
+
if number_input?(element)
|
|
1103
1104
|
return unless include_minmax? minmax
|
|
1104
1105
|
subtract_minmax minmax
|
|
1105
1106
|
normalize!
|
|
@@ -1917,6 +1918,14 @@ module Net
|
|
|
1917
1918
|
input
|
|
1918
1919
|
end
|
|
1919
1920
|
|
|
1921
|
+
# NOTE: input_try_convert must be called on input first
|
|
1922
|
+
def number_input?(input)
|
|
1923
|
+
case input
|
|
1924
|
+
when *STARS, Integer then true
|
|
1925
|
+
when String then !input.include?(/[:,]/)
|
|
1926
|
+
end
|
|
1927
|
+
end
|
|
1928
|
+
|
|
1920
1929
|
def import_range_minmax(range)
|
|
1921
1930
|
first = import_num(range.begin || 1)
|
|
1922
1931
|
last = import_num(range.end || :*)
|
data/lib/net/imap.rb
CHANGED
|
@@ -788,7 +788,7 @@ module Net
|
|
|
788
788
|
# * {IMAP URLAUTH Authorization Mechanism Registry}[https://www.iana.org/assignments/urlauth-authorization-mechanism-registry/urlauth-authorization-mechanism-registry.xhtml]
|
|
789
789
|
#
|
|
790
790
|
class IMAP < Protocol
|
|
791
|
-
VERSION = "0.6.
|
|
791
|
+
VERSION = "0.6.2"
|
|
792
792
|
|
|
793
793
|
# Aliases for supported capabilities, to be used with the #enable command.
|
|
794
794
|
ENABLE_ALIASES = {
|
|
@@ -3230,7 +3230,7 @@ module Net
|
|
|
3230
3230
|
warn(RESPONSES_DEPRECATION_MSG, uplevel: 1, category: :deprecated)
|
|
3231
3231
|
when :frozen_dup
|
|
3232
3232
|
synchronize {
|
|
3233
|
-
responses = @responses.transform_values
|
|
3233
|
+
responses = @responses.transform_values { _1.dup.freeze }
|
|
3234
3234
|
responses.default_proc = nil
|
|
3235
3235
|
responses.default = [].freeze
|
|
3236
3236
|
return responses.freeze
|