filter_io 0.2.10 → 0.2.11

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: 6bb6c9bf480676e8e8f76bc297c78b2898cca42d2a4b366d62b117c5edf73167
4
- data.tar.gz: c9994613dd2f4baad9eb51a8403e821ffae1faa3f1bcaa0edb3c1969349efccf
3
+ metadata.gz: 2aa379c9231e3f092273dbc5cf5306b9dcb58b749aa4c3c4ada4081995b1dbf4
4
+ data.tar.gz: 370b83c3187be5d2a863e7b94e75a717da16ee6c25360edd91eae61ba0e713b8
5
5
  SHA512:
6
- metadata.gz: 027622b16c8febb4e1cc978f603bbb9c4d1527c13bed972a0633ef61015593d728728d61c18a87c80c141849796c50acbfde8d7cd775de773eb6cd441389b5ad
7
- data.tar.gz: 6dc6d5c4d8ecb4ebf980bde869091ed0afeee5380e4e61dfbef1dab9add5bafbf1ea99327038d5460a3b1e7f53ca81f01f2e103694fbe335f1def9098d00d79e
6
+ metadata.gz: 7805dc1d20a7325bb87161836b67e8cf949ed021411678f5280d0ebd85ef6e535c27cf4b32cc935b35690c99b529d79ad0413397ca0f50129a6f0a6a653016c3
7
+ data.tar.gz: e8d5aac3c61ca1b819e6b6b029af39a432735ab1734ec8d0a2ef3c0ee777812d185284a5ea40bd8275ee7ec4b34e5c11ce8857e60842a633f8aeb7c2b1f8f7db
@@ -1,3 +1,3 @@
1
1
  class FilterIO
2
- VERSION = '0.2.10'
2
+ VERSION = '0.2.11'
3
3
  end
data/lib/filter_io.rb CHANGED
@@ -278,7 +278,7 @@ class FilterIO
278
278
  def with_byte_buffer
279
279
  begin
280
280
  org_encoding = @buffer.encoding
281
- @buffer.force_encoding 'ASCII-8BIT'
281
+ @buffer.force_encoding Encoding::BINARY
282
282
  yield
283
283
  ensure
284
284
  @buffer.force_encoding org_encoding
@@ -336,7 +336,7 @@ class FilterIO
336
336
  data = [data] unless data.is_a? Array
337
337
  raise 'Block must have 1 or 2 values' unless data.size <= 2
338
338
  if @buffer.encoding != data[0].encoding
339
- if [@buffer, data[0]].any? { |x| x.encoding.to_s == 'ASCII-8BIT' }
339
+ if [@buffer, data[0]].any? { |x| x.encoding == Encoding::BINARY }
340
340
  data[0] = data[0].dup.force_encoding @buffer.encoding
341
341
  end
342
342
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filter_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Weathered
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-21 00:00:00.000000000 Z
11
+ date: 2022-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler