multi_range 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/multi_range.rb +1 -1
- data/lib/multi_range/version.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: c58749306160704fe7b4a316fd550b43cec3468209a65a5077aa6414f1576c6e
|
4
|
+
data.tar.gz: 5e2923db7411209d35ca86baadb153f593d97a7530a84fbf1b28df5cb98beb25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51b0294b27975e344d440a366a45658ef2b916ebb8b999e61edc4420124c0ea1b4f1a7401417815f5c7a435dc8e46fb19c6ff132282189828825780ae87a0797
|
7
|
+
data.tar.gz: e6b510be7d8e2e971f671f98963f58c9476bd91199c791bdc36c694828f3e92549877a7a1dfa1b58b2e73364efb8121753934fc1225943dc1cd53ce473af24df
|
data/lib/multi_range.rb
CHANGED
@@ -22,7 +22,7 @@ class MultiRange
|
|
22
22
|
attr_reader :ranges
|
23
23
|
|
24
24
|
def initialize(ranges)
|
25
|
-
@ranges = ranges.map{|s| s.is_a?(Numeric) ? s..s : s }.sort_by
|
25
|
+
@ranges = ranges.map{|s| s.is_a?(Numeric) ? s..s : s }.sort_by{|s| s.begin }.freeze
|
26
26
|
@is_float = @ranges.any?{|range| range.begin.is_a?(Float) || range.end.is_a?(Float) }
|
27
27
|
end
|
28
28
|
|
data/lib/multi_range/version.rb
CHANGED