diff --git a/lib/net/http.rb b/lib/net/http.rb index 83cf46cb..047208b4 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1529,7 +1529,7 @@ def use_ssl=(flag) :verify_hostname, ] # :nodoc: - SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym } # :nodoc: + SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym }.freeze # :nodoc: # Sets or returns the path to a CA certification file in PEM format. attr_accessor :ca_file diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb index 6f6fb8d0..5e2f8ce1 100644 --- a/lib/net/http/responses.rb +++ b/lib/net/http/responses.rb @@ -1104,7 +1104,7 @@ class Net::HTTPResponse '3' => Net::HTTPRedirection, '4' => Net::HTTPClientError, '5' => Net::HTTPServerError - } + }.freeze CODE_TO_OBJ = { '100' => Net::HTTPContinue, '101' => Net::HTTPSwitchProtocol, @@ -1170,5 +1170,5 @@ class Net::HTTPResponse '508' => Net::HTTPLoopDetected, '510' => Net::HTTPNotExtended, '511' => Net::HTTPNetworkAuthenticationRequired, - } + }.freeze end