lib/httpx/plugins/compression.rb in httpx-0.22.2 vs lib/httpx/plugins/compression.rb in httpx-0.22.3

- old
+ new

@@ -28,11 +28,11 @@ end module OptionsMethods def option_compression_threshold_size(value) bytes = Integer(value) - raise TypeError, ":expect_threshold_size must be positive" unless bytes.positive? + raise TypeError, ":compression_threshold_size must be positive" unless bytes.positive? bytes end def option_encodings(value) @@ -136,11 +136,11 @@ end def each(&blk) return enum_for(__method__) unless blk - return deflate(&blk) if @buffer.size.zero? + return deflate(&blk) if @buffer.size.zero? # rubocop:disable Style/ZeroLengthPredicate @buffer.rewind @buffer.each(&blk) end @@ -150,10 +150,10 @@ end private def deflate(&blk) - return unless @buffer.size.zero? + return unless @buffer.size.zero? # rubocop:disable Style/ZeroLengthPredicate @body.rewind @deflater.deflate(@body, @buffer, chunk_size: 16_384, &blk) end end