diff options
Diffstat (limited to 'lib/plum/connection.rb')
-rw-r--r-- | lib/plum/connection.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/plum/connection.rb b/lib/plum/connection.rb index a69a9c8..a8b2916 100644 --- a/lib/plum/connection.rb +++ b/lib/plum/connection.rb @@ -1,3 +1,4 @@ +# -*- frozen-string-literal: true -*- using Plum::BinaryString module Plum @@ -6,7 +7,7 @@ module Plum include FlowControl include ConnectionUtils - CLIENT_CONNECTION_PREFACE = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n".freeze + CLIENT_CONNECTION_PREFACE = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" DEFAULT_SETTINGS = { header_table_size: 4096, # octets @@ -25,7 +26,7 @@ module Plum @writer = writer @local_settings = Hash.new {|hash, key| DEFAULT_SETTINGS[key] }.merge!(local_settings) @remote_settings = Hash.new {|hash, key| DEFAULT_SETTINGS[key] } - @buffer = "".force_encoding(Encoding::BINARY) + @buffer = String.new @streams = {} @state = :negotiation @hpack_decoder = HPACK::Decoder.new(@local_settings[:header_table_size]) |