diff --git a/lib/http/2/huffman.rb b/lib/http/2/huffman.rb index bc20dc7..5580813 100644 --- a/lib/http/2/huffman.rb +++ b/lib/http/2/huffman.rb @@ -30,7 +30,7 @@ def encode(str) # @return [String] binary string # @raise [CompressionError] when Huffman coded string is malformed def decode(buf) - emit = '' + emit = String.new state = 0 # start state mask = (1 << BITS_AT_ONCE) - 1 diff --git a/spec/framer_spec.rb b/spec/framer_spec.rb index 0f73712..d3735f7 100644 --- a/spec/framer_spec.rb +++ b/spec/framer_spec.rb @@ -1,3 +1,4 @@ +# frozen-string-literal: false require 'helper' RSpec.describe HTTP2::Framer do diff --git a/spec/helper.rb b/spec/helper.rb index 99b8b55..4d7eeb8 100644 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -1,3 +1,4 @@ +# frozen-string-literal: false require './spec/support/deep_dup' RSpec.configure(&:disable_monkey_patching!)