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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c90e6ec55fc0ac745db7265fd6dd06ef646e6df3
4
- data.tar.gz: 0495a28d9059e00566c33d8b7ff96a33b6b52634
3
+ metadata.gz: 8df678695ca231cc81ab948596ee0b3b44fd32f9
4
+ data.tar.gz: f25664ae97f4fe7c940328583362badc97cde426
5
5
  SHA512:
6
- metadata.gz: f280299dc5745d3699da18b1b215ac4173b4177fca6b59adcc8b050fc59166f630566c8636a5188b28faf2c70e7cd85a1e75f88fa6f634aa853fe3bd63da53b8
7
- data.tar.gz: 40253070c817442cb21af305964dbb3f04fbff8841b584a0f0f92000b806875d1c3f47b164f7732abe187dc40f7bd23959bd69cba0a9ef9dce5c5d4c819debc7
6
+ metadata.gz: b73e714c95402fa1dbb31fc235564b0e97db788aa78a07d93daf42ce6030ed26def4a9b444411b77d0cce44a98afde5f3e2d0cf85ebb8fcf87d47b9ba9ae1bfc
7
+ data.tar.gz: ad2c01a0d7b67d6ad6a315e8e12b0a18a39f59e974b716748a569c93ec7c6d4ade39de645433cdc4a7c5771ef29ec2e78da155cffbc7b3c77ce9a710b2265680
Binary file
@@ -1,3 +1,3 @@
1
1
  module MessagePack
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
@@ -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)
@@ -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.1
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: 2017-12-08 00:00:00.000000000 Z
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