cbor 0.5.9.5 → 0.5.9.7
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 +4 -4
- data/.travis.yml +4 -3
- data/cbor.gemspec +1 -1
- data/ext/cbor/buffer_class.c +2 -1
- data/ext/cbor/packer.h +1 -1
- data/ext/cbor/unpacker.c +1 -1
- data/ext/cbor/unpacker_class.c +2 -1
- data/lib/cbor/version.rb +1 -1
- data/spec/format_spec.rb +9 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9fb505e33230c48113158f04b25e36d4c7454ab501de79d58466abf1a02ae9e
|
4
|
+
data.tar.gz: addfe6006c0032513a39dbf11cded4b5fe454c9fc1928908ad21c109e57e3e55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35bf4eff36721c9f42df3946143bfeebdf1ff663ded128f7e5e74e84b9564422018e9c341380cf2ff4f772874719faa1e94ab58bae83861ae14abed12478a4d8
|
7
|
+
data.tar.gz: 21e0cbeebebdf01b2134b9e0d4045acb69ab8dd4cb21c35e37f08ee7cecbba23a1e6a2385995bea680e164d41baea44ceb90e4c24a77af520db06f7be4349522
|
data/.travis.yml
CHANGED
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'
|
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']
|
data/ext/cbor/buffer_class.c
CHANGED
@@ -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,
|
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==
|
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)
|
data/ext/cbor/unpacker_class.c
CHANGED
@@ -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
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.
|
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:
|
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: '
|
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: '
|
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.
|
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:
|