cbor 0.5.9.5 → 0.5.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/cbor/packer.h +1 -1
- data/lib/cbor/version.rb +1 -1
- data/spec/format_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66e94d0670480bd8e653ea0a044303ce47d445c8a7f311a3779c726cccbc6e24
|
4
|
+
data.tar.gz: 2f095fc969e7c1353dc5a626c096a6ceddbd9d39737b2fe7d77bcb7cf2d1c30a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e80ba76467f4927421e537c52db8cd068d2b8009d7f259af555c16ebb7b284442832772b10b70911c289b969f507f271dcf926869551a4bc43fe8b7b1b04c559
|
7
|
+
data.tar.gz: c9920aa86b677e52ed233aaeae27a5871a08ac1f031a77fa52aec8ce4e9e9815a4b5688fe90ae90c97a35c25a9f63f2789893556d9ea6b60961706bb10c372f7
|
data/ext/cbor/packer.h
CHANGED
@@ -348,7 +348,7 @@ void msgpack_packer_write_value(msgpack_packer_t* pk, VALUE v);
|
|
348
348
|
|
349
349
|
static inline void msgpack_packer_write_tagged_value(msgpack_packer_t* pk, VALUE v)
|
350
350
|
{
|
351
|
-
cbor_encoder_write_head(pk, IB_TAG,
|
351
|
+
cbor_encoder_write_head(pk, IB_TAG, rb_num2ulong(rb_struct_aref(v, INT2FIX(0))));
|
352
352
|
msgpack_packer_write_value(pk, rb_struct_aref(v, INT2FIX(1)));
|
353
353
|
}
|
354
354
|
|
data/lib/cbor/version.rb
CHANGED
data/spec/format_spec.rb
CHANGED
@@ -375,6 +375,15 @@ describe MessagePack do
|
|
375
375
|
}.should raise_error(MessagePack::MalformedFormatError)
|
376
376
|
end
|
377
377
|
|
378
|
+
it "Tagged" do
|
379
|
+
expect { check 10, CBOR::Tagged.new("foo", 2) }.to raise_error(TypeError)
|
380
|
+
check 2, CBOR::Tagged.new(10, 2)
|
381
|
+
check 4, CBOR::Tagged.new(0xBEEF, 2)
|
382
|
+
check 6, CBOR::Tagged.new(0xDEADBEEF, 2)
|
383
|
+
check 10, CBOR::Tagged.new(0xDEADBEEFDEADBEEF, 2)
|
384
|
+
expect { check 10, CBOR::Tagged.new(0x1DEADBEEFDEADBEEF, 2) }.to raise_error(RangeError)
|
385
|
+
end
|
386
|
+
|
378
387
|
it "Time" do
|
379
388
|
check_decode "\xc1\x19\x12\x67", Time.at(4711)
|
380
389
|
check 6, Time.at(Time.now.to_i)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cbor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.9.
|
4
|
+
version: 0.5.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann, standing on the tall shoulders of Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|