packable 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/packable/extensions/io.rb +1 -1
- data/lib/packable/version.rb +1 -1
- data/test/packing_test.rb +7 -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: 9ff119e7cc22b81b365a6b56bfea0f5361cd4171
|
4
|
+
data.tar.gz: 76cff9e8574909266778c4164035e54e41319439
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 771b79907fda443f469cdbadcdc05f1740c1c0666bb55ed6cec5589d9061df758a0a4b4c7f0929adb0375422172bddd61eb2b2a11cf5654c361d67b2011ea103
|
7
|
+
data.tar.gz: 1cd0a39beeb41566bc721d25ff64abe2fa7401bb0e39544893f81e3da3b91dcc4ff0e2a9c306521fd1dec6ef631e416a06fbd2cbabe35fb0cf7800ffbc9355d7
|
@@ -63,7 +63,7 @@ module Packable
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def read_with_packing(*arg)
|
66
|
-
return read_without_packing(*arg) if
|
66
|
+
return read_without_packing(*arg) if arg.length == 0 || arg.first.nil? || arg.first.is_a?(Numeric)
|
67
67
|
values = Packable::Packers.to_class_option_list(*arg).map do |klass, options, original|
|
68
68
|
if options[:read_packed]
|
69
69
|
options[:read_packed].call(self)
|
data/lib/packable/version.rb
CHANGED
data/test/packing_test.rb
CHANGED
@@ -82,6 +82,13 @@ class TestingPack < Minitest::Test
|
|
82
82
|
assert_equal "should read(nil)", io.read(nil)
|
83
83
|
end
|
84
84
|
|
85
|
+
def test_io_read_to_outbuf
|
86
|
+
# library was failing to call read_without_packing when invoked with fixnum and output buffer.
|
87
|
+
io = StringIO.new("should read(fixnum, buf)")
|
88
|
+
io.read(11, outbuf='')
|
89
|
+
assert_equal "should read", outbuf
|
90
|
+
end
|
91
|
+
|
85
92
|
should "do basic type checking" do
|
86
93
|
assert_raises(TypeError) {"".unpack(42, :short)}
|
87
94
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-André Lafortune
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backports
|