[ruby/net-http] turn on frozen strings for net/http/generic_request

https://github.com/ruby/net-http/commit/b92ade088d
This commit is contained in:
Josh Nichols 2023-08-11 18:02:57 -04:00 коммит произвёл git
Родитель 8d04260acd
Коммит 2fbd8dca18
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1,4 +1,4 @@
# frozen_string_literal: false
# frozen_string_literal: true
#
# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
#
@ -316,7 +316,7 @@ class Net::HTTPGenericRequest
boundary ||= SecureRandom.urlsafe_base64(40)
chunked_p = chunked?
buf = ''
buf = String.new
params.each do |key, value, h={}|
key = quote_string(key, charset)
filename =
@ -401,7 +401,7 @@ class Net::HTTPGenericRequest
if /[\r\n]/ =~ reqline
raise ArgumentError, "A Request-Line must not contain CR or LF"
end
buf = ""
buf = String.new
buf << reqline << "\r\n"
each_capitalized do |k,v|
buf << "#{k}: #{v}\r\n"