From 4650f8698103f0601c856844985cfa2ddf0c85e0 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 19 Nov 2024 18:13:09 +0900 Subject: [PATCH] Need to restore under the Net namespace --- lib/net/http.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/net/http.rb b/lib/net/http.rb index e97628e..7a5b080 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -738,12 +738,6 @@ class HTTP < Protocol rescue LoadError HAVE_ZLIB=false end - - # for backward compatibility until Ruby 3.5 - # https://bugs.ruby-lang.org/issues/20900 - # https://github.com/bblimke/webmock/pull/1081 - HTTPSession = HTTP - deprecate_constant :HTTPSession # :startdoc: # Returns +true+; retained for compatibility. @@ -2565,6 +2559,11 @@ def debug(msg) alias_method :D, :debug end + # for backward compatibility until Ruby 3.5 + # https://bugs.ruby-lang.org/issues/20900 + # https://github.com/bblimke/webmock/pull/1081 + HTTPSession = HTTP + deprecate_constant :HTTPSession end require_relative 'http/exceptions'