зеркало из https://github.com/github/ruby.git
[ruby/net-http] Remove deprecated constants
These constants, isolated in net/http/backward.rb, have not only been deprecated since 2001, but have also had a warning since 2021. https://github.com/ruby/net-http/commit/265bfa929f
This commit is contained in:
Родитель
1b417c3e64
Коммит
8e98fbdd19
|
@ -2573,5 +2573,3 @@ require_relative 'http/response'
|
||||||
require_relative 'http/responses'
|
require_relative 'http/responses'
|
||||||
|
|
||||||
require_relative 'http/proxy_delta'
|
require_relative 'http/proxy_delta'
|
||||||
|
|
||||||
require_relative 'http/backward'
|
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
# for backward compatibility
|
|
||||||
|
|
||||||
# :enddoc:
|
|
||||||
|
|
||||||
class Net::HTTP
|
|
||||||
ProxyMod = ProxyDelta
|
|
||||||
deprecate_constant :ProxyMod
|
|
||||||
end
|
|
||||||
|
|
||||||
module Net::NetPrivate
|
|
||||||
HTTPRequest = ::Net::HTTPRequest
|
|
||||||
deprecate_constant :HTTPRequest
|
|
||||||
end
|
|
||||||
|
|
||||||
module Net
|
|
||||||
HTTPSession = HTTP
|
|
||||||
|
|
||||||
HTTPInformationCode = HTTPInformation
|
|
||||||
HTTPSuccessCode = HTTPSuccess
|
|
||||||
HTTPRedirectionCode = HTTPRedirection
|
|
||||||
HTTPRetriableCode = HTTPRedirection
|
|
||||||
HTTPClientErrorCode = HTTPClientError
|
|
||||||
HTTPFatalErrorCode = HTTPClientError
|
|
||||||
HTTPServerErrorCode = HTTPServerError
|
|
||||||
HTTPResponseReceiver = HTTPResponse
|
|
||||||
|
|
||||||
HTTPResponceReceiver = HTTPResponse # Typo since 2001
|
|
||||||
|
|
||||||
deprecate_constant :HTTPSession,
|
|
||||||
:HTTPInformationCode,
|
|
||||||
:HTTPSuccessCode,
|
|
||||||
:HTTPRedirectionCode,
|
|
||||||
:HTTPRetriableCode,
|
|
||||||
:HTTPClientErrorCode,
|
|
||||||
:HTTPFatalErrorCode,
|
|
||||||
:HTTPServerErrorCode,
|
|
||||||
:HTTPResponseReceiver,
|
|
||||||
:HTTPResponceReceiver
|
|
||||||
end
|
|
Загрузка…
Ссылка в новой задаче