cbor-diag 0.9.8 → 0.9.9

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: ae0f990a039f1c2b0c08af5ff06a25868210f0aaf219810674e254fb3e1dabe9
4
- data.tar.gz: 812d69e74907bb80861a277c60f58a17522fa14869eeddc8b2ecfcd78533cb12
3
+ metadata.gz: 54f6f772655e8d9e5c33d6f51030f4b51076f8ddb9a0dec7f778b679e6e0d13d
4
+ data.tar.gz: 45327c30bf0ff893e38243fa511516267a91a9b60c3168a52b73b530e2e6ff52
5
5
  SHA512:
6
- metadata.gz: 40d28a0d95ffdfcf1badd9dda4d1200385306fe5ceb53492ec6ed246ffe08b763583a0c364d33714c174ffcea4002e57ff46448a0d82a52de5fc7c1247b72a60
7
- data.tar.gz: 42c5aaa0fcb2600d6ef515db1d8e9739ba769c2d4ba65e8b4d9948932b08e532f20edee1ed7f7ecbf883186b6f744a404d519fc1f5cb9d03f447fc73172146e8
6
+ metadata.gz: 47a70a70dbb3cf27f15048ee83f080b359778deada122840a40896f709941b46c8fe7169d333081de947ac94fdefdd415d0493cfceb0f3aa353cd723466cf8cd
7
+ data.tar.gz: 160560be71a888c113e761bad1f3835b519221b6ed3075ef8c6565c428c89feb06e6cfdf2ea227de06c7d3c76e610ebdd7e794fdea9dc18c4b89e02ebd36b5fb
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.8"
3
+ s.version = "0.9.9"
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"
@@ -3507,9 +3507,11 @@ module CBOR_DIAG
3507
3507
  r0
3508
3508
  end
3509
3509
 
3510
- end
3511
3510
 
3512
- class CBOR_DIAGParser < Treetop::Runtime::CompiledParser
3513
- include CBOR_DIAG
3511
+ class Parser < Treetop::Runtime::CompiledParser
3512
+ include CBOR_DIAG
3513
+ end
3514
3514
  end
3515
3515
 
3516
+ CBOR_DIAGParser = CBOR_DIAG::Parser
3517
+
data/lib/cbor-pure.rb CHANGED
@@ -302,8 +302,18 @@ module CBOR
302
302
  raise "two-byte simple is #{val} but must be between 32 and 255" unless val >= 32;
303
303
  Simple.new(val)
304
304
  when 25; Half.decode(val)
305
- when 26; s.unpack("g").first # cannot go directly from val
306
- when 27; s.unpack("G").first # in Ruby
305
+ when 26;
306
+ v = s.unpack("g").first # cannot go directly from val in Ruby
307
+ if v.nan?
308
+ # work around quiet bit always set with unpack("g"):
309
+ # https://bugs.ruby-lang.org/issues/20662
310
+ qbit = s.getbyte(1)[6]
311
+ vbytes = [v].pack("G")
312
+ vbytes.setbyte(1, vbytes.getbyte(1) & 0xf7 | qbit << 3)
313
+ v = vbytes.unpack("G").first
314
+ end
315
+ v
316
+ when 27; s.unpack("G").first # cannot go directly from val in Ruby
307
317
  else
308
318
  Simple.new(val)
309
319
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbor-diag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-03 00:00:00.000000000 Z
10
+ date: 2025-08-04 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler