mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/net-http] Warn deprecated old constants
https://github.com/ruby/net-http/commit/2a97b4729b
This commit is contained in:
parent
b49dbe025f
commit
3d8e1ee40f
1 changed files with 24 additions and 14 deletions
|
@ -5,26 +5,36 @@
|
|||
|
||||
class Net::HTTP
|
||||
ProxyMod = ProxyDelta
|
||||
end
|
||||
|
||||
module Net
|
||||
HTTPSession = Net::HTTP
|
||||
deprecate_constant :ProxyMod
|
||||
end
|
||||
|
||||
module Net::NetPrivate
|
||||
HTTPRequest = ::Net::HTTPRequest
|
||||
deprecate_constant :HTTPRequest
|
||||
end
|
||||
|
||||
Net::HTTPInformationCode = Net::HTTPInformation
|
||||
Net::HTTPSuccessCode = Net::HTTPSuccess
|
||||
Net::HTTPRedirectionCode = Net::HTTPRedirection
|
||||
Net::HTTPRetriableCode = Net::HTTPRedirection
|
||||
Net::HTTPClientErrorCode = Net::HTTPClientError
|
||||
Net::HTTPFatalErrorCode = Net::HTTPClientError
|
||||
Net::HTTPServerErrorCode = Net::HTTPServerError
|
||||
Net::HTTPResponseReceiver = Net::HTTPResponse
|
||||
|
||||
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 :HTTPResponceReceiver
|
||||
|
||||
deprecate_constant :HTTPSession,
|
||||
:HTTPInformationCode,
|
||||
:HTTPSuccessCode,
|
||||
:HTTPRedirectionCode,
|
||||
:HTTPRetriableCode,
|
||||
:HTTPClientErrorCode,
|
||||
:HTTPFatalErrorCode,
|
||||
:HTTPServerErrorCode,
|
||||
:HTTPResponseReceiver,
|
||||
:HTTPResponceReceiver
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue