code-ruby 1.6.10 → 1.6.11

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
  SHA256:
3
- metadata.gz: cdae56ab2a8131adde0250872f81b39da931f4f93a9ccd93ae1b86a3d63aa295
4
- data.tar.gz: f71ce983de47ef6225934531bd84d55ca30bcea0a95f813f3d023fa1839c3482
3
+ metadata.gz: '0867ea95cf4d089deb39820f05c1547d4c0d6e9464fcd13327021092fd0c61c0'
4
+ data.tar.gz: 510513c7b820cfcb51809678b92d67d8c5371e56d1c4d0ce5b8e0bb7e3db2291
5
5
  SHA512:
6
- metadata.gz: fcddbc545c4f6e72d88c2df056765cf4d6eed5e2facc1433314a75d94fc70779cb01fa741305364a96b822f99e020f9d58988b667e5532788f755db60e8cdda3
7
- data.tar.gz: dcf9f22574c9a95b43ae5fb16158f8f31be8c0c99eb737b8bd6ca079f07044495cee9b9f6bbce3621c5286ec00caa3c35faa63e7e568529e96b30931e6777bf7
6
+ metadata.gz: 3ab87db7351c2e826e44d5966dd108f86617b49ae44cf6dfd3f62bd4d17134485a8281149af5facd670e97ebd7e669f39e5b95e173f5bc539ad9e4b7880e927a
7
+ data.tar.gz: 053dd30a22b5ff9b1043a5f2ac126f10fb04ebaea425a2cd110ea302f956173eaa94e2c4538fd8bff8eb3672043b10a5b9cde74c54a73052ed9c40eda33c46c3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- code-ruby (1.6.10)
4
+ code-ruby (1.6.11)
5
5
  activesupport
6
6
  base64
7
7
  bigdecimal
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.10
1
+ 1.6.11
@@ -162,20 +162,23 @@ class Code
162
162
 
163
163
  def <=>(other)
164
164
  code_other = other.to_code
165
+ return -1 if self.class != code_other.class
165
166
 
166
- [raw, self.class] <=> [code_other.raw, code_other.class]
167
+ raw <=> code_other.raw
167
168
  end
168
169
 
169
170
  def ==(other)
170
171
  code_other = other.to_code
172
+ return false if self.class != code_other.class
171
173
 
172
- [raw, self.class] == [code_other.raw, code_other.class]
174
+ raw == code_other.raw
173
175
  end
174
176
 
175
177
  def eql?(other)
176
178
  code_other = other.to_code
179
+ return false if self.class != code_other.class
177
180
 
178
- [raw, self.class].eql?([code_other.raw, code_other.class])
181
+ raw.eql?(code_other.raw)
179
182
  end
180
183
 
181
184
  def code_and(other)
@@ -1018,6 +1018,15 @@ class Code
1018
1018
  raw.dup.to_h { |key, value| [key, value].map(&:code_deep_duplicate) }
1019
1019
  )
1020
1020
  end
1021
+
1022
+ def <=>(other)
1023
+ code_other = other.to_code
1024
+ return -1 if self.class != code_other.class
1025
+ return 0 if raw == code_other.raw
1026
+ return -1 if raw < code_other.raw
1027
+ return 1 if raw > code_other.raw
1028
+ -1
1029
+ end
1021
1030
  end
1022
1031
  end
1023
1032
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.10
4
+ version: 1.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié