cbor-diag 0.9.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c41a7144e024520508e8b84b485aa53ae8b9e45f26eb60574cec5acef4c97e50
4
- data.tar.gz: af46eaddb14028e6c54f6d63f261e255b7f629f8089a5d1f228d97ba916368cb
3
+ metadata.gz: 8f01333932a6fb7c1479a0c82afb49fbc52ce8f854675b5b9c7340bfe6251a4e
4
+ data.tar.gz: 6e5b104bbf7214ea2104e07681f48dfb84e5de1c3b2f4fdb8e47609616d29b62
5
5
  SHA512:
6
- metadata.gz: 88cb362411df944ca64d929678f74282ecaa4c91257fe0fb38262789fe360b095e51b5ecaa6fb094f071df179051b96ddfb28b743a72bb80eccc2e6985165732
7
- data.tar.gz: 3e3fec444f1996f724ea4ef05fa3ddd6ca9fc8edad06a3c85176a023ddb30ae1633c21140e59c1fbe3beb264ed6cf5396e25f8c4d22cd7647cb8f1fc4ebc68bd
6
+ metadata.gz: 58e2602d6c645d2f22f99293be8708d16f56adc2def08d59f2f231e561e9a71f7a6a71759f4c3a2bf6d1305498c5aa29abf6ecca22309925791145bdeb246cf0
7
+ data.tar.gz: 14a216acb543617fae6713a2742f9ab40861f609bd55cdadd05eb71094e5abd393e0d60725ec42fc5fe8e9402141b359fb706ade71faa6c695407adec0f4c877
data/cbor-diag.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cbor-diag"
3
- s.version = "0.9.0"
3
+ s.version = "0.9.2"
4
4
  s.summary = "CBOR (Concise Binary Object Representation) diagnostic notation"
5
5
  s.description = %q{cbor-diag implements diagnostic notation for CBOR, RFC 8949 and RFC 8742}
6
6
  s.author = "Carsten Bormann"
@@ -2,7 +2,7 @@ require 'scanf'
2
2
 
3
3
  class CBOR_DIAG::App_nan
4
4
  def self.decode(_, s)
5
- val, = s.scanf("%a")
5
+ val, = s.sub("p0", "p+0").scanf("%a")
6
6
  raise ArgumentError.new ("nan'#{s}' not valid") unless val &&
7
7
  val.abs > 1.0 && val.abs < 2.0
8
8
  val.cbor_nan_toggle
@@ -21,7 +21,7 @@ class Float
21
21
  def cbor_diagnostic(options = {}) # do a little bit of JSON.stringify gaming (ECMA-262, 9.8.1)
22
22
  if options[:nan] && nan?
23
23
  pl = cbor_nan_toggle
24
- return "nan'#{'%a' % pl}'"
24
+ return "nan'#{('%a' % pl).gsub("+", "")}'"
25
25
  end
26
26
  a = abs
27
27
  if a < 1 && a >= 1e-6
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbor-diag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-04 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler