msgpack 1.2.1-java → 1.2.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/msgpack/msgpack.jar +0 -0
- data/lib/msgpack/version.rb +1 -1
- data/spec/factory_spec.rb +13 -0
- data/spec/packer_spec.rb +44 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df678695ca231cc81ab948596ee0b3b44fd32f9
|
4
|
+
data.tar.gz: f25664ae97f4fe7c940328583362badc97cde426
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b73e714c95402fa1dbb31fc235564b0e97db788aa78a07d93daf42ce6030ed26def4a9b444411b77d0cce44a98afde5f3e2d0cf85ebb8fcf87d47b9ba9ae1bfc
|
7
|
+
data.tar.gz: ad2c01a0d7b67d6ad6a315e8e12b0a18a39f59e974b716748a569c93ec7c6d4ade39de645433cdc4a7c5771ef29ec2e78da155cffbc7b3c77ce9a710b2265680
|
data/lib/msgpack/msgpack.jar
CHANGED
Binary file
|
data/lib/msgpack/version.rb
CHANGED
data/spec/factory_spec.rb
CHANGED
@@ -331,6 +331,19 @@ describe MessagePack::Factory do
|
|
331
331
|
end
|
332
332
|
end
|
333
333
|
|
334
|
+
describe 'under stressful GC' do
|
335
|
+
it 'works well' do
|
336
|
+
begin
|
337
|
+
GC.stress = true
|
338
|
+
|
339
|
+
f = MessagePack::Factory.new
|
340
|
+
f.register_type(0x0a, Symbol)
|
341
|
+
ensure
|
342
|
+
GC.stress = false
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
334
347
|
describe 'DefaultFactory' do
|
335
348
|
it 'is a factory' do
|
336
349
|
MessagePack::DefaultFactory.should be_kind_of(MessagePack::Factory)
|
data/spec/packer_spec.rb
CHANGED
@@ -372,6 +372,50 @@ describe MessagePack::Packer do
|
|
372
372
|
end
|
373
373
|
end
|
374
374
|
|
375
|
+
context 'when it and its super class has an ext type' do
|
376
|
+
before { stub_const('Value', Class.new) }
|
377
|
+
before do
|
378
|
+
Value.class_eval do
|
379
|
+
def to_msgpack_ext
|
380
|
+
'value_msgpacked'
|
381
|
+
end
|
382
|
+
end
|
383
|
+
end
|
384
|
+
before { packer.register_type(0x01, Value, :to_msgpack_ext) }
|
385
|
+
|
386
|
+
context "when it is a child class" do
|
387
|
+
before { stub_const('InheritedValue', Class.new(Value)) }
|
388
|
+
before do
|
389
|
+
InheritedValue.class_eval do
|
390
|
+
def to_msgpack_ext
|
391
|
+
'inherited_value_msgpacked'
|
392
|
+
end
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
before { packer.register_type(0x02, InheritedValue, :to_msgpack_ext) }
|
397
|
+
subject { packer.pack(InheritedValue.new).to_s }
|
398
|
+
|
399
|
+
it { is_expected.to eq "\xC7\x19\x02inherited_value_msgpacked" }
|
400
|
+
end
|
401
|
+
|
402
|
+
context "even when it is a child class" do
|
403
|
+
before { stub_const('InheritedValue', Class.new(Value)) }
|
404
|
+
before do
|
405
|
+
InheritedValue.class_eval do
|
406
|
+
def to_msgpack_ext
|
407
|
+
'inherited_value_msgpacked'
|
408
|
+
end
|
409
|
+
end
|
410
|
+
end
|
411
|
+
|
412
|
+
before { packer.register_type(0x02, InheritedValue, :to_msgpack_ext) }
|
413
|
+
subject { packer.pack(Value.new).to_s }
|
414
|
+
|
415
|
+
it { is_expected.to eq "\xC7\x0F\x01value_msgpacked" }
|
416
|
+
end
|
417
|
+
end
|
418
|
+
|
375
419
|
context 'when it has no ext type but an included module has' do
|
376
420
|
subject { packer.pack(Value.new).to_s }
|
377
421
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msgpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|