[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:
Nobuyoshi Nakada 2024-11-15 11:59:14 +09:00 коммит произвёл git
Родитель 1b417c3e64
Коммит 8e98fbdd19
2 изменённых файлов: 0 добавлений и 42 удалений

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

@ -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