msgpack 0.7.3-x64-mingw32 → 0.7.4-x64-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: e3dc98d2ed050350318c82da89581b967419d609
4
- data.tar.gz: 9e65d5dc4dd80567d5ad2f2143b99d5cd2662f96
3
+ metadata.gz: dbb1a03e91634c5c1d5e4e59b98c2a1a5b56aad1
4
+ data.tar.gz: 44caf7cf0814b48e31d135052f0c9c6a8f195d82
5
5
  SHA512:
6
- metadata.gz: 231ea8acacbe0c03be96dd022a05521241cad93dd21f3b02a2837e13af7fba2d50eeaa905ccc587e74199a341afffc44088c4d84cc0f335557a94bc03a8a1fbe
7
- data.tar.gz: 718f51c7485dd557345dfaeb2cb9a7ad7ca46da99f601eda4f8081f5ee2f9c45540c7735ebd5a04103e58c5562e84b614a7245b265197291fa239a37127f0bb7
6
+ metadata.gz: dc8e55f71ed85a8064ce11f04b3ade7c6623f7f2ae84592b077c8241c55f0d8160c4c0839022d5a88d206b572afde2027e274347d5612227ab02be569c37f4ff
7
+ data.tar.gz: 2efbc536f66474937cb8b2ee6305ed80c0fcadc0ca06207535d649d8b7b3a1e1b6ca31fc705c47d3c5fdcae6b435f5ffc636b1d017cd8abaf5e584aa9388a7e8
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: x64-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
@@ -190,6 +190,7 @@ files:
190
190
  - lib/msgpack/2.0/msgpack.so
191
191
  - lib/msgpack/2.1/msgpack.so
192
192
  - lib/msgpack/2.2/msgpack.so
193
+ - lib/msgpack/2.3/msgpack.so
193
194
  - lib/msgpack/factory.rb
194
195
  - lib/msgpack/packer.rb
195
196
  - lib/msgpack/unpacker.rb
@@ -239,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
240
  version: '0'
240
241
  requirements: []
241
242
  rubyforge_project: msgpack
242
- rubygems_version: 2.4.8
243
+ rubygems_version: 2.5.1
243
244
  signing_key:
244
245
  specification_version: 4
245
246
  summary: MessagePack, a binary-based efficient data interchange format.