From 8e98fbdd19e49e6972d1eda1523b699b99a825f6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 15 Nov 2024 11:59:14 +0900 Subject: [PATCH] [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 --- 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 c673d0d622..cf607e8bed 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -2573,5 +2573,3 @@ require_relative 'http/response' 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 b44577edbd..0000000000 --- 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