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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24e7953c276fcc3632223b24365e6c324a5f5b7b
4
- data.tar.gz: 2739c2b63bd6fbab2a79db3c35b3a41ae4753dc8
3
+ metadata.gz: 9ff119e7cc22b81b365a6b56bfea0f5361cd4171
4
+ data.tar.gz: 76cff9e8574909266778c4164035e54e41319439
5
5
  SHA512:
6
- metadata.gz: 1b06119ec61a835e6ff5d5db4da1de60311561e943c58985d725bf9c839da505a9b45406e96fc879c78ca45bab711d0484c9db24e0500a171251edfba51f9587
7
- data.tar.gz: e3184c73de7c225ed121362f679c709baac4cb88b5f15297f89250361dfec4052e2eb06537c3780ad4c46fef69f073252cab9c1ad6094b1944165f5ddd18836c
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 (arg.length == 0) || arg.first.nil? || (arg.first.is_a?(Numeric) && (arg.length == 1))
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)
@@ -1,3 +1,3 @@
1
1
  module Packable
2
- VERSION = "1.3.7"
2
+ VERSION = "1.3.8"
3
3
  end
@@ -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.7
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-09 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backports