diff options
author | Eric Wong <e@80x24.org> | 2016-02-14 22:04:10 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-02-14 22:06:17 +0000 |
commit | 61f71e4487c172083e3f0b8c3f14706e76c5f30d (patch) | |
tree | 550c5d3f5ec756a2627e550df30ce8bb5154362f | |
parent | 1843dc670dc46d89e0a28039a1b9d263c8336c28 (diff) | |
download | yahns-61f71e4487c172083e3f0b8c3f14706e76c5f30d.tar.gz |
This saves about 100 bytes of iseq overhead based on my measurements.
-rw-r--r-- | lib/yahns/http_context.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/yahns/http_context.rb b/lib/yahns/http_context.rb index c02eefd..40f2c58 100644 --- a/lib/yahns/http_context.rb +++ b/lib/yahns/http_context.rb @@ -82,8 +82,7 @@ module Yahns::HttpContext # :nodoc: # short requests are most common if len && len <= @client_body_buffer_size; # Can't use binmode, yet: https://bugs.ruby-lang.org/issues/11945 - tmp = StringIO.new - tmp.set_encoding(Encoding::ASCII_8BIT) + tmp = StringIO.new(''.dup) else # too big or chunked, unknown length tmp = @input_buffer_tmpdir mbs = @client_max_body_size |