diff options
author | Josh Nichols <josh.nichols@gusto.com> | 2023-08-11 18:02:57 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-08-16 01:40:08 +0000 |
commit | 2fbd8dca18a102cb3ffc5e7e6235c09fd0d04ba3 (patch) | |
tree | 89beb8fd7ac3c0d1f4bc588105633d89ba1d8770 | |
parent | 8d04260acd8b6fba98867acc1a7e786495813fa0 (diff) |
[ruby/net-http] turn on frozen strings for net/http/generic_request
https://github.com/ruby/net-http/commit/b92ade088d
-rw-r--r-- | lib/net/http/generic_request.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/http/generic_request.rb b/lib/net/http/generic_request.rb index 8877cd04ae..1f0d2e52c2 100644 --- a/lib/net/http/generic_request.rb +++ b/lib/net/http/generic_request.rb @@ -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" |