From 265bfa929f4bcd80b5ad0269a25908da4898bf87 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 15 Nov 2024 11:59:14 +0900 Subject: [PATCH] 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. --- lib/net/http.rb | 2 -- lib/net/http/backward.rb | 40 ---------------------------------------- 2 files changed, 42 deletions(-) delete mode 100644 lib/net/http/backward.rb diff --git a/lib/net/http.rb b/lib/net/http.rb index 5f6a9adf..e6d1bb04 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -2573,5 +2573,3 @@ def debug(msg) require_relative 'http/responses' require_relative 'http/proxy_delta' - -require_relative 'http/backward' diff --git a/lib/net/http/backward.rb b/lib/net/http/backward.rb deleted file mode 100644 index b44577ed..00000000 --- a/lib/net/http/backward.rb +++ /dev/null @@ -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