msgpack 0.7.3-x86-mingw32 → 0.7.4-x86-mingw32

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: 0fa00e550e98cfdd269a0705815dde4289acae52
4
- data.tar.gz: 6168ebd1a29a858dd828640eefb2b0a9b496b6de
3
+ metadata.gz: 01d4dce353c0b7f66861cc2c2d58571c1091d798
4
+ data.tar.gz: 6f3dc90263da4f2027ae06fe8ecae2d490727795
5
5
  SHA512:
6
- metadata.gz: 9fa8400032d353219c36495d8cacf69c4038c182621146e416baf5687ff9b351aa66018014ec06d69720231fe65c3ad6efab0c89cc9578f5fe8c6560a3c6466c
7
- data.tar.gz: 5a121d12376bd987d1a777be149d75240e74d698cbeac6e0f189535a7b182abedefaaeff194bb6cf36231baea224f6398b2860de704e9863bafd470c50c65f99
6
+ metadata.gz: dc81eee34389b032bcda2341f616baa1ee89449d65b115936d83aa16a4e9821d77c528e03416fbd65195a3c713a154a25ca24c9ac51d6746f42369afec1c8342
7
+ data.tar.gz: 825e2e90fac1ab7693419c7d0029fe045508db3f71c8348a0e472c5329abe4e74f5b7ecfcf2b459243d5a03cb9135c9ea794868526990d1aaee53204cdaa35cc
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 2016-01-08 version 0.7.4:
2
+
3
+ * Improved compatibility of Packer between CRuby and JRuby about argument IO-ish object values.
4
+
1
5
  2016-01-07 version 0.7.3:
2
6
 
3
7
  * Add Packer#write_float32 method to pack floating point numbers into FLOAT of messagepack.
data/Rakefile CHANGED
@@ -65,7 +65,7 @@ namespace :build do
65
65
  desc 'Build gems for Windows per rake-compiler-dock'
66
66
  task :windows do
67
67
  require 'rake_compiler_dock'
68
- RakeCompilerDock.sh 'bundle && rake cross native gem RUBY_CC_VERSION=1.9.3:2.0.0:2.1.6:2.2.2:2.3.0'
68
+ RakeCompilerDock.sh 'bundle && gem i json && rake cross native gem RUBY_CC_VERSION=1.9.3:2.0.0:2.1.6:2.2.2:2.3.0'
69
69
  end
70
70
  end
71
71
 
@@ -42,8 +42,9 @@ public class Buffer extends RubyObject {
42
42
  @JRubyMethod(name = "initialize", optional = 2)
43
43
  public IRubyObject initialize(ThreadContext ctx, IRubyObject[] args) {
44
44
  if (args.length > 0) {
45
- if (args[0].respondsTo("read") && args[0].respondsTo("write")) {
46
- this.io = args[0];
45
+ IRubyObject io = args[0];
46
+ if (io.respondsTo("close") && (io.respondsTo("read") || (io.respondsTo("write") && io.respondsTo("flush")))) {
47
+ this.io = io;
47
48
  }
48
49
  }
49
50
  this.buffer = ByteBuffer.allocate(CACHE_LINE_SIZE - ARRAY_HEADER_SIZE);
@@ -1,3 +1,3 @@
1
1
  module MessagePack
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
@@ -44,21 +44,18 @@ describe MessagePack::Packer do
44
44
  dio.rewind
45
45
  expect(dio.string).to eql(sample_packed)
46
46
 
47
- unless defined? JRUBY_VERSION
48
- # JRuby seems to have bug not to flush GzipWriter buffer correctly (both of 1.7 and 9.0)
49
- dio = StringIO.new
50
- writer = Zlib::GzipWriter.new(dio)
51
- writer.sync = true
52
- p3 = MessagePack::Packer.new(writer)
53
- p3.write sample_data
54
- p3.flush
55
- writer.flush(Zlib::FINISH)
56
- writer.close
57
- dio.rewind
58
- compressed = dio.string
59
- str = Zlib::GzipReader.wrap(StringIO.new(compressed)){|gz| gz.read }
60
- expect(str).to eql(sample_packed)
61
- end
47
+ dio = StringIO.new
48
+ writer = Zlib::GzipWriter.new(dio)
49
+ writer.sync = true
50
+ p3 = MessagePack::Packer.new(writer)
51
+ p3.write sample_data
52
+ p3.flush
53
+ writer.flush(Zlib::FINISH)
54
+ writer.close
55
+ dio.rewind
56
+ compressed = dio.string
57
+ str = Zlib::GzipReader.wrap(StringIO.new(compressed)){|gz| gz.read }
58
+ expect(str).to eql(sample_packed)
62
59
 
63
60
  class DummyIO
64
61
  def initialize
@@ -87,6 +84,9 @@ describe MessagePack::Packer do
87
84
  def flush
88
85
  # nop
89
86
  end
87
+ def close
88
+ # nop
89
+ end
90
90
  end
91
91
 
92
92
  dio = DummyIO.new
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: 0.7.3
4
+ version: 0.7.4
5
5
  platform: x86-mingw32
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: 2016-01-07 00:00:00.000000000 Z
13
+ date: 2016-01-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -191,6 +191,7 @@ files:
191
191
  - lib/msgpack/2.0/msgpack.so
192
192
  - lib/msgpack/2.1/msgpack.so
193
193
  - lib/msgpack/2.2/msgpack.so
194
+ - lib/msgpack/2.3/msgpack.so
194
195
  - lib/msgpack/factory.rb
195
196
  - lib/msgpack/packer.rb
196
197
  - lib/msgpack/unpacker.rb
@@ -240,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
241
  version: '0'
241
242
  requirements: []
242
243
  rubyforge_project: msgpack
243
- rubygems_version: 2.4.8
244
+ rubygems_version: 2.5.1
244
245
  signing_key:
245
246
  specification_version: 4
246
247
  summary: MessagePack, a binary-based efficient data interchange format.