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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec3ff9c80d1ebf61154f6adbd475eb487748e3ddb738d55d914802a37e4ff608
4
- data.tar.gz: f1210b308bb2a4207578d82e8538a43994e99779bc7bb44a17a6e63d01c7c5d5
3
+ metadata.gz: 66e94d0670480bd8e653ea0a044303ce47d445c8a7f311a3779c726cccbc6e24
4
+ data.tar.gz: 2f095fc969e7c1353dc5a626c096a6ceddbd9d39737b2fe7d77bcb7cf2d1c30a
5
5
  SHA512:
6
- metadata.gz: 1b21900c2b783d18fb4089d6d9a9a04cc5973d00bee14031364ff6b0107afefa4939ada64fe27ceb6eb75fb5b4aef7e5194163050fc7e1ee0d575456347ca20a
7
- data.tar.gz: f8e01fd9cb3ba019f63a67d561cc4267f64868a53befa2e925e979ed107de315e4add952e56e516a26ce28bbad656d3ae1f873c75e920f47350d8197c635929d
6
+ metadata.gz: e80ba76467f4927421e537c52db8cd068d2b8009d7f259af555c16ebb7b284442832772b10b70911c289b969f507f271dcf926869551a4bc43fe8b7b1b04c559
7
+ data.tar.gz: c9920aa86b677e52ed233aaeae27a5871a08ac1f031a77fa52aec8ce4e9e9815a4b5688fe90ae90c97a35c25a9f63f2789893556d9ea6b60961706bb10c372f7
@@ -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, FIX2LONG(rb_struct_aref(v, INT2FIX(0))));
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
 
@@ -1,3 +1,3 @@
1
1
  module CBOR
2
- VERSION = "0.5.9.5"
2
+ VERSION = "0.5.9.6"
3
3
  end
@@ -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.5
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-21 00:00:00.000000000 Z
11
+ date: 2019-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler