msgpack 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/ext/java/org/msgpack/jruby/Buffer.java +3 -2
- data/lib/msgpack/version.rb +1 -1
- data/spec/packer_spec.rb +15 -15
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 452730fc6dbf9e301355b759c9f5ff7080bb88ad
|
4
|
+
data.tar.gz: 7bd19e617d2298a59be2505929f0888167c39d1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f42256792f53a9188e688222f0f44c461bdc3849614bd155f0340a48de437fde596d294341a8b30de27269c69f4ef984da40cca12c76f76c312b83d08a8bf58d
|
7
|
+
data.tar.gz: eab376976af6d888b3422a25cd49a4a7dbbe9e11071a0b8ae40491700505cb10d7e5b7768fc8f459aa93e3a58d7f9fe940d0fb70e268244e76f67f3757dfad32
|
data/ChangeLog
CHANGED
@@ -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
|
-
|
46
|
-
|
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);
|
data/lib/msgpack/version.rb
CHANGED
data/spec/packer_spec.rb
CHANGED
@@ -44,21 +44,18 @@ describe MessagePack::Packer do
|
|
44
44
|
dio.rewind
|
45
45
|
expect(dio.string).to eql(sample_packed)
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
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-
|
13
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
237
|
version: '0'
|
238
238
|
requirements: []
|
239
239
|
rubyforge_project: msgpack
|
240
|
-
rubygems_version: 2.
|
240
|
+
rubygems_version: 2.5.1
|
241
241
|
signing_key:
|
242
242
|
specification_version: 4
|
243
243
|
summary: MessagePack, a binary-based efficient data interchange format.
|