fat_core 0.1.9 → 0.1.10

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
  SHA1:
3
- metadata.gz: 54ce983c1d43b7c9b67972299a634117b7d7de2d
4
- data.tar.gz: 41b1588e17acfc8e918726d6ff358df23d8c3076
3
+ metadata.gz: 41f3c535cff303356a43f0c50fd2f3628980b593
4
+ data.tar.gz: 2ec1814ff9b4830de04e655575c36551e2a6034d
5
5
  SHA512:
6
- metadata.gz: 7f34ec86d849b6e8f1d3484238ac57a56142d4a9b4744048109dd515a0d38d8231c727d81951e41045c1333c04eb2d5c5b1d71badff7331a93a9f3977855c247
7
- data.tar.gz: 108f60886a9b08b084a58ab8152d9a1cb1a4f0c647abffbfc614eee904c9b7892846be940faaec9c8f1afe4848263752cdc516996900180f76bc2b522cbeb2fc
6
+ metadata.gz: 14112d1eca56bb81540764ba7cd128192ad3d100d887ff190bed388bac880615b89d2099bcd23de214e5aa42c221156ba2bcd7c8355885064eac38e3923a2cba
7
+ data.tar.gz: 5c12d2e4fab0805bd87059918489420e4e1e97d8227e0c2f55bdfbc761fbc287289c45f0a9f374a58c02813897469664c56c8362d2b1f427348ad27c87dab153
@@ -151,7 +151,7 @@ class Range
151
151
  end_point = rr.min.pred
152
152
  gaps << (start_point..end_point)
153
153
  cur_point = rr.max.succ
154
- elsif rr.max > cur_point
154
+ elsif rr.max >= cur_point
155
155
  cur_point = rr.max.succ
156
156
  end
157
157
  end
@@ -1,7 +1,7 @@
1
1
  module FatCore
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
- PATCH = 9
4
+ PATCH = 10
5
5
 
6
6
  VERSION = [MAJOR, MINOR, PATCH].compact.join('.')
7
7
  end
@@ -222,6 +222,12 @@ describe Range do
222
222
  expect(gaps[1]).to eq((9..10))
223
223
  end
224
224
 
225
+ it "should notice single point coverage" do
226
+ gaps = (0..10).gaps([(4..4), (5..5), (6..6)])
227
+ expect(gaps[0]).to eq((0..3))
228
+ expect(gaps[1]).to eq((7..10))
229
+ end
230
+
225
231
  it "should work even if ranges overlap" do
226
232
  gaps = (0..10).gaps([(-2..3), (2..8), (4..10)])
227
233
  expect(gaps).to be_empty
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel E. Doherty