treemap-fork 1.0.4.1 → 1.0.4.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/treemap/bounded_map.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f3d55aa6e50c45084aa9b579f6d1c66fee20130
|
4
|
+
data.tar.gz: 88e74b93eeef952e126fce15e6c131a219de2e44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67502cd0e50a2646b66a593144790b6aae7836514799e399b11c4e8ca00fe9a324baac4f512b9586397e70e939fb5b5d5aa07cadad839fdd8f3d30ebb9d1d7fa
|
7
|
+
data.tar.gz: 1b10e0243c70c005eadb3cc39482c52d9ae245dcd8457baea0a4a0bf4385558282819f18eae5969f5670984681d1122405a8282848816648464dcae741434324
|
data/lib/treemap/bounded_map.rb
CHANGED
@@ -170,7 +170,7 @@ class TreeMap
|
|
170
170
|
key = @to
|
171
171
|
if @to_bound == Bound::EXCLUSIVE
|
172
172
|
relation = Relation::LOWER # 'to' is too high
|
173
|
-
|
173
|
+
elsif comparison < 0
|
174
174
|
relation = Relation::FLOOR # we already went lower
|
175
175
|
end
|
176
176
|
end
|
@@ -182,7 +182,7 @@ class TreeMap
|
|
182
182
|
key = @from
|
183
183
|
if @from_bound == Bound::EXCLUSIVE
|
184
184
|
relation = Relation::HIGHER # 'from' is too low
|
185
|
-
|
185
|
+
elsif comparison > 0
|
186
186
|
relation = Relation::CEILING # we already went higher
|
187
187
|
end
|
188
188
|
end
|
@@ -321,7 +321,7 @@ class TreeMap
|
|
321
321
|
case args.count
|
322
322
|
when 1
|
323
323
|
from_inclusive = args.first
|
324
|
-
bounded_sub_map(
|
324
|
+
bounded_sub_map(from_inclusive, Bound::INCLUSIVE, nil, Bound::NO_BOUND)
|
325
325
|
when 2
|
326
326
|
from, inclusive = *args
|
327
327
|
from_bound = inclusive ? Bound::INCLUSIVE : Bound::EXCLUSIVE
|