simple-data 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: 3db7d6e8e14e9b8b814f77983389421167fe6cb903f0fe36903131bec7aef040
4
- data.tar.gz: 2a902b19246723a3d6ac2f854e8813074efc4ff59e9619bde4a2b31d775a1920
3
+ metadata.gz: 58034c7baa9961e9d038600d0d3a5aeb5b0d9e2d794ca5c1df06a9387bc944c2
4
+ data.tar.gz: 85b415e5e37de378f97e9797c1ca2304bbf454f30821da39303cc52fad84b9aa
5
5
  SHA512:
6
- metadata.gz: 6f67761bd5036a3c394c2e0d7502b8ca4450fdd82a453e9fa5d41a4eb86874aa686f9c8f97453d994c4672d69109ba239f0cdfa1f364f90f99f838a88e302030
7
- data.tar.gz: 654bf8bccd261d9c3b62a53131ebdbc4492d4ea5d048b624a31869ac522f5999d61615007546f19a0200a43f6934e7cd8704b1721dc97f57dfbaa4bb8c63db99
6
+ metadata.gz: a4b31167024aec064b90ecf531769a98bc10b5b4e702637c5fa3bf4e8c320b11a5c0955b6ec236007a8f9d5a810dbc1fac784ba1d27598420546d0c3ca034c9b
7
+ data.tar.gz: f35b584990bb6dce182c3e1d3adc3cd48bb74727b60c5e369ae1cb212e172f57552ba1dc9029b9c8d55a96bacc315410fee4ad2f64372f51d61030e146e11826
@@ -62,6 +62,14 @@ class SimpleData
62
62
  end
63
63
 
64
64
  def eof?
65
+ return false unless @sio.eof?
66
+ return true if @io.eof?
67
+
68
+ # Refill
69
+ cstr = @io.read(@read_size)
70
+ @sio.string = @decoder.call(cstr)
71
+
72
+ # Recheck
65
73
  @io.eof? && @sio.eof?
66
74
  end
67
75
 
@@ -1,4 +1,4 @@
1
1
  class SimpleData
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
4
4
 
data/lib/simple-data.rb CHANGED
@@ -88,7 +88,7 @@ class SimpleData
88
88
  when :cstr then [ d ].pack('Z*')
89
89
  when :blob then raise ParserError, 'not implemented'
90
90
  when :char then [ d ].pack('c' )
91
- when :bool then [ d ? 'T' : 'F' ].pack('c')
91
+ when :bool then [ d ? 'T' : 'F' ]
92
92
  end
93
93
  }.join
94
94
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stéphane D'Alu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-07 00:00:00.000000000 Z
11
+ date: 2023-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zstd-ruby