diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2015-08-13 03:43:55 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2015-08-13 03:43:55 +0900 |
commit | f54124648d55344bdbc5d42ba62f427d8dbe922b (patch) | |
tree | d67031bf1fed79cefb9b88f46ab9386e02f3d348 | |
parent | 8a5541d786022e118d73e2cab4e2d985c4a45842 (diff) | |
download | plum-f54124648d55344bdbc5d42ba62f427d8dbe922b.tar.gz |
hpack: remove unneeded force_encoding
-rw-r--r-- | lib/plum/hpack/encoder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/plum/hpack/encoder.rb b/lib/plum/hpack/encoder.rb index a82c9b1..a6c4fcf 100644 --- a/lib/plum/hpack/encoder.rb +++ b/lib/plum/hpack/encoder.rb @@ -23,7 +23,7 @@ module Plum # | Value String (Length octets) | # +-------------------------------+ def encode(headers) - out = "".force_encoding(Encoding::BINARY) + out = "" headers.each do |name, value| name = name.to_s; value = value.to_s out << "\x00" @@ -38,7 +38,7 @@ module Plum private def encode_integer(value, prefix_length) mask = (1 << prefix_length) - 1 - out = "".force_encoding(Encoding::BINARY) + out = "" if value < mask out.push_uint8(value) |