cbor-dcbor 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cbor-dcbor.gemspec +1 -1
- data/lib/cbor-dcbor.rb +2 -2
- 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: d528326aea2cd21dde7091d75c18bd1dfdf106485d556b353cdaec7778c5d94e
|
4
|
+
data.tar.gz: 62a6fa5fc20d1a6e3c9f91382aa68b2167c996fb47e93b4570d791d310706af0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 659dcaf464132729ca8969582794f22c5e146265580f7718448711145c704f7443601db6a5581d220e1686e2f1f37d1c7b8c25ed93cdc52101f566cfb421d93d
|
7
|
+
data.tar.gz: fe8a1b43b95ea3c51de2be67c1d25232441c42d021177a3b873207c9c805c123d365dd727c387a8130d71113417264e14486249fa6be2313a4e710863c5ddba6
|
data/cbor-dcbor.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cbor-dcbor"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.2"
|
4
4
|
s.summary = "CBOR (Concise Binary Object Representation) \"dCBOR\" encoding"
|
5
5
|
s.description = %q{cbor-dcbor implements "dCBOR" encoding for CBOR, RFC 8949}
|
6
6
|
s.author = "Carsten Bormann"
|
data/lib/cbor-dcbor.rb
CHANGED
@@ -35,8 +35,8 @@ module CBOR
|
|
35
35
|
module Float_Dcbor_CBOR
|
36
36
|
def cbor_prepare_dcbor
|
37
37
|
int = self.to_i
|
38
|
-
if int == self && int.
|
39
|
-
int
|
38
|
+
if int == self && int.to_dcbor.size <= self.to_cbor.size
|
39
|
+
int.cbor_prepare_dcbor
|
40
40
|
else
|
41
41
|
self
|
42
42
|
end
|