We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1faa48a + 5d08297 commit 02e44b1Copy full SHA for 02e44b1
lib/redis_client/ruby_connection/buffered_io.rb
@@ -147,9 +147,6 @@ def ensure_remaining(bytes)
147
end
148
149
150
- RESET_BUFFER_ENCODING = RUBY_ENGINE == "truffleruby"
151
- private_constant :RESET_BUFFER_ENCODING
152
-
153
def fill_buffer(strict, size = @chunk_size)
154
remaining = size
155
start = @offset - @buffer.bytesize
@@ -174,7 +171,7 @@ def fill_buffer(strict, size = @chunk_size)
174
171
if empty_buffer
175
172
@offset = start
176
173
empty_buffer = false
177
- @buffer.force_encoding(Encoding::UTF_8) if RESET_BUFFER_ENCODING
+ @buffer.force_encoding(Encoding::UTF_8) unless @buffer.encoding == Encoding::UTF_8
178
else
179
@buffer << bytes.force_encoding(Encoding::UTF_8)
180
0 commit comments