deepsort 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/deepsort.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjY5YWRlMjU4MmJiZTYyN2E2NDUwNDdmYmJmMTVlY2Q5N2FkMDE1Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmFjMDc5YjdmNDA2NDE1YmEzYjZkM2EzODg0OWI5ODEyODg4MmM0NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTJjMTUzMTExNDEwZDUxYTc0Njc5MjQyZTkzMzJlMzBlNjJhMDA5ZWQ0M2Nk
|
10
|
+
OWI1YTE2MmI2MTU0YWQ0NjE5NDM0ZjdhM2JlYTdiYjdiM2E1NzljZTkxZGFk
|
11
|
+
OWQ1M2JhY2FkNmJhNTlkMDYwY2EwMjU2NDU3YjQxZTU2YzY2NzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2Q5YzEwMzA5NzNjYjY5YTAwOWE3YTg0NmM3YzU5OTYzMjg2NWYwZjUzYmZl
|
14
|
+
ZjJjMTAzZTY0ZTRlNDI0OWRjNjY3YzE5OTZkYjg4Y2VjNzNjMDU5ZjA0ZmIz
|
15
|
+
NThmMzkzZDQwNmVkZGEwYmY3OGYwMjcxMTgwOGQwYmFhODI1NjA=
|
data/lib/deepsort.rb
CHANGED
@@ -88,6 +88,11 @@ module DeepSort
|
|
88
88
|
|
89
89
|
end.sort_by(&block)])
|
90
90
|
end
|
91
|
+
|
92
|
+
# comparison for hashes is ill-defined. this performs array comparison if the normal comparison fails.
|
93
|
+
def <=>(other)
|
94
|
+
super(other) || to_a <=> other.to_a
|
95
|
+
end
|
91
96
|
end
|
92
97
|
end
|
93
98
|
Array.send(:include, DeepSort::DeepSortArray)
|