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 +4 -4
- data/lib/filter_io/version.rb +1 -1
- data/lib/filter_io.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aa379c9231e3f092273dbc5cf5306b9dcb58b749aa4c3c4ada4081995b1dbf4
|
4
|
+
data.tar.gz: 370b83c3187be5d2a863e7b94e75a717da16ee6c25360edd91eae61ba0e713b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7805dc1d20a7325bb87161836b67e8cf949ed021411678f5280d0ebd85ef6e535c27cf4b32cc935b35690c99b529d79ad0413397ca0f50129a6f0a6a653016c3
|
7
|
+
data.tar.gz: e8d5aac3c61ca1b819e6b6b029af39a432735ab1734ec8d0a2ef3c0ee777812d185284a5ea40bd8275ee7ec4b34e5c11ce8857e60842a633f8aeb7c2b1f8f7db
|
data/lib/filter_io/version.rb
CHANGED
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
|
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
|
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.
|
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:
|
11
|
+
date: 2022-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|