net-imap 0.6.0 → 0.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 561e6151a9540c8eaa6c12fd16d625061843a053fb0b0c8a2f215eb1a518ef70
4
- data.tar.gz: 5be61c15097d2e0007822fc6c4825f59795d6078d6cf9b5cbe6ed4dd2bd1d22e
3
+ metadata.gz: 1ae6f1b476869edfc86c6dc8fa41879985532983dd975aab9ad001f18ab0c9b9
4
+ data.tar.gz: daea9364b0c5925d1df567e63bb02488f0ce09d56a0bc2ab893ba4f3be320baa
5
5
  SHA512:
6
- metadata.gz: f84a8adf89f177e953fe57e390b027232bc4c7325ecb0049221a88db87fccc76a09281aea87c4f48de05bc547db1248b628b9c271134a466aedba953305001cc
7
- data.tar.gz: 0b82898fb8581bab9a30c5b3edb96c89d81c4bddf197ade29a25ef166db827983a6c2c25d1eda9989a9f985cfcbec52f4bf484dbc1b57cfde32f432dcd0dfbc3
6
+ metadata.gz: e797892aa6f483e8e13b7b40c7f84e45d1919f08715daf8931ad73ee8ff41fac9fdb943cc9bb41d268942e884d3fd51c8ed291aa6c64c237ab7a193f63d337c9
7
+ data.tar.gz: 66af8fc6b85409ca6fef21fe54eb9f7a26515f771a39155a9e02682d7dfca6d315f0ad86c54711bdf1423616f41678675594d287188e030ebd57ccc239a5e86d
@@ -788,7 +788,11 @@ module Net
788
788
  # Related: #min, #minmax, #slice
789
789
  def max(count = nil, star: :*)
790
790
  if count
791
- slice(-[count, size].min..) || remain_frozen_empty
791
+ if cardinality <= count
792
+ frozen? ? self : dup
793
+ else
794
+ slice(-count..) || remain_frozen_empty
795
+ end
792
796
  elsif (val = max_num)
793
797
  val == STAR_INT ? star : val
794
798
  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.0"
791
+ VERSION = "0.6.1"
792
792
 
793
793
  # Aliases for supported capabilities, to be used with the #enable command.
794
794
  ENABLE_ALIASES = {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-imap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shugo Maeda
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 4.0.1
132
+ rubygems_version: 4.0.2
133
133
  specification_version: 4
134
134
  summary: Ruby client api for Internet Message Access Protocol
135
135
  test_files: []