From 743ac6ccbb86dcd14eb203c5f83cccb59d4eb7c2 Mon Sep 17 00:00:00 2001 From: Oleg Tolmashov Date: Mon, 4 Aug 2025 15:28:10 +0400 Subject: [PATCH] fix frozen literal warning --- lib/em-http/http_encoding.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/em-http/http_encoding.rb b/lib/em-http/http_encoding.rb index cf7e647c..af198e67 100644 --- a/lib/em-http/http_encoding.rb +++ b/lib/em-http/http_encoding.rb @@ -126,7 +126,7 @@ def encode_auth(k,v) end def encode_headers(head) - head.inject('') do |result, (key, value)| + head.inject(String.new) do |result, (key, value)| # Munge keys from foo-bar-baz to Foo-Bar-Baz key = key.split('-').map { |k| k.to_s.capitalize }.join('-') result << case key @@ -140,7 +140,7 @@ def encode_headers(head) def encode_cookie(cookie) if cookie.is_a? Hash - cookie.inject('') { |result, (k, v)| result << encode_param(k, v) + ";" } + cookie.inject(String.new) { |result, (k, v)| result << encode_param(k, v) + ";" } else cookie end