deepsort 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/deepsort.rb +5 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTM1YTQ1NjczOTQ3MDVlYzQzM2E4MjgxYzI3MmI0ZjhiNGRiZjNkMg==
4
+ YjY5YWRlMjU4MmJiZTYyN2E2NDUwNDdmYmJmMTVlY2Q5N2FkMDE1Mg==
5
5
  data.tar.gz: !binary |-
6
- ZDYzMGZiZTRlYjk0ZWQzNTg4Yjg1ODA5NjQ4YzNlZmQ4OWJhZmIxZQ==
6
+ ZmFjMDc5YjdmNDA2NDE1YmEzYjZkM2EzODg0OWI5ODEyODg4MmM0NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzM1ZTVhNWE2NzdmY2I0M2VkNTVjNmQyYzBkZWFjNGEyYjFiZGZlOTE2MWNk
10
- Y2M1ZTVkYzY4ZWVlMDNkZjhhOTM0NTczNWZhNGNiODc4MjE2OTU4NTQ1NTA4
11
- NDgyOGEwNjViMGIxNWY1MDEwNGIzYzcwZDQ5MDc5ZDRiMDQ5Yzc=
9
+ MTJjMTUzMTExNDEwZDUxYTc0Njc5MjQyZTkzMzJlMzBlNjJhMDA5ZWQ0M2Nk
10
+ OWI1YTE2MmI2MTU0YWQ0NjE5NDM0ZjdhM2JlYTdiYjdiM2E1NzljZTkxZGFk
11
+ OWQ1M2JhY2FkNmJhNTlkMDYwY2EwMjU2NDU3YjQxZTU2YzY2NzY=
12
12
  data.tar.gz: !binary |-
13
- NTU1MWVjMTNlOTVlMzI1MzRkZDc5NDhmMzc0YTJiYzMxYjc3MjNjODMwYTdi
14
- ZjVmYmJlYWE4ZDU2NzBkM2YzZmJhZDA0YWIxNjhkYmJkOTI0NjM2OWJhYmI4
15
- ZjUyZWZlMWUyMWI5NmE4NTkwMTQ3NDAxNzMzZWY4MDYyYWQ5ZmE=
13
+ N2Q5YzEwMzA5NzNjYjY5YTAwOWE3YTg0NmM3YzU5OTYzMjg2NWYwZjUzYmZl
14
+ ZjJjMTAzZTY0ZTRlNDI0OWRjNjY3YzE5OTZkYjg4Y2VjNzNjMDU5ZjA0ZmIz
15
+ NThmMzkzZDQwNmVkZGEwYmY3OGYwMjcxMTgwOGQwYmFhODI1NjA=
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deepsort
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Crossen