cbor 0.5.9.5 → 0.5.9.7

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: b9fb505e33230c48113158f04b25e36d4c7454ab501de79d58466abf1a02ae9e
4
+ data.tar.gz: addfe6006c0032513a39dbf11cded4b5fe454c9fc1928908ad21c109e57e3e55
5
5
  SHA512:
6
- metadata.gz: 1b21900c2b783d18fb4089d6d9a9a04cc5973d00bee14031364ff6b0107afefa4939ada64fe27ceb6eb75fb5b4aef7e5194163050fc7e1ee0d575456347ca20a
7
- data.tar.gz: f8e01fd9cb3ba019f63a67d561cc4267f64868a53befa2e925e979ed107de315e4add952e56e516a26ce28bbad656d3ae1f873c75e920f47350d8197c635929d
6
+ metadata.gz: 35bf4eff36721c9f42df3946143bfeebdf1ff663ded128f7e5e74e84b9564422018e9c341380cf2ff4f772874719faa1e94ab58bae83861ae14abed12478a4d8
7
+ data.tar.gz: 21e0cbeebebdf01b2134b9e0d4045acb69ab8dd4cb21c35e37f08ee7cecbba23a1e6a2385995bea680e164d41baea44ceb90e4c24a77af520db06f7be4349522
data/.travis.yml CHANGED
@@ -3,9 +3,10 @@ rvm:
3
3
  - 2.0.0
4
4
  - 2.1.10
5
5
  - 2.2.10
6
- - 2.3.7
7
- - 2.4.4
8
- - 2.5.1
6
+ - 2.3.8
7
+ - 2.4.6
8
+ - 2.5.5
9
+ - 2.6.3
9
10
  - ruby-head
10
11
  matrix:
11
12
  allow_failures:
data/cbor.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ["lib"]
17
17
  s.extensions = ["ext/cbor/extconf.rb"]
18
18
 
19
- s.add_development_dependency 'bundler', RUBY_VERSION.to_f < 2.3 ? ['~> 1.0'] : ['~> 2.0']
19
+ s.add_development_dependency 'bundler'
20
20
  s.add_development_dependency 'rake', ['~> 0.9.2']
21
21
  s.add_development_dependency 'rake-compiler', ['~> 0.8.3']
22
22
  s.add_development_dependency 'rspec', ['~> 2.11']
@@ -254,10 +254,11 @@ static VALUE read_until_eof_rescue(VALUE args)
254
254
  return Qnil;
255
255
  }
256
256
 
257
- static VALUE read_until_eof_error(VALUE args)
257
+ static VALUE read_until_eof_error(VALUE args, VALUE error)
258
258
  {
259
259
  /* ignore EOFError */
260
260
  UNUSED(args);
261
+ UNUSED(error);
261
262
  return Qnil;
262
263
  }
263
264
 
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, 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
 
data/ext/cbor/unpacker.c CHANGED
@@ -31,7 +31,7 @@
31
31
 
32
32
  /* work around https://bugs.ruby-lang.org/issues/15779 for now
33
33
  * by limiting preallocation to about a Tebibyte
34
- * limit is 2**n-1 (n==10) so we can avoid a conditional
34
+ * limit is 2**n-1 (n==28) so we can avoid a conditional
35
35
  */
36
36
  #define SANE_PREALLOCATION_MAX 0xFFFFFFFUL
37
37
  #define SANE_PREALLOCATE(n) (n & SANE_PREALLOCATION_MAX)
@@ -261,9 +261,10 @@ static VALUE Unpacker_each_impl(VALUE self)
261
261
  }
262
262
  }
263
263
 
264
- static VALUE Unpacker_rescue_EOFError(VALUE self)
264
+ static VALUE Unpacker_rescue_EOFError(VALUE self, VALUE error)
265
265
  {
266
266
  UNUSED(self);
267
+ UNUSED(error);
267
268
  return Qnil;
268
269
  }
269
270
 
data/lib/cbor/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CBOR
2
- VERSION = "0.5.9.5"
2
+ VERSION = "0.5.9.7"
3
3
  end
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,29 +1,29 @@
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.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann, standing on the tall shoulders of Sadayuki Furuhashi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-21 00:00:00.000000000 Z
11
+ date: 2023-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -160,7 +160,7 @@ homepage: http://cbor.io/
160
160
  licenses:
161
161
  - Apache-2.0
162
162
  metadata: {}
163
- post_install_message:
163
+ post_install_message:
164
164
  rdoc_options: []
165
165
  require_paths:
166
166
  - lib
@@ -175,8 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  requirements: []
178
- rubygems_version: 3.0.3
179
- signing_key:
178
+ rubygems_version: 3.4.10
179
+ signing_key:
180
180
  specification_version: 4
181
181
  summary: CBOR, Concise Binary Object Representation.
182
182
  test_files: