Skip to content

Commit 37f17d2

Browse files
committed
Restore HTTPSession constant for backward compatibility
1 parent 3a83e46 commit 37f17d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/net/http.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,12 @@ class HTTP < Protocol
738738
rescue LoadError
739739
HAVE_ZLIB=false
740740
end
741+
742+
# for backward compatibility until Ruby 3.5
743+
# https://bugs.ruby-lang.org/issues/20900
744+
# https://github.com/bblimke/webmock/pull/1081
745+
HTTPSession = HTTP
746+
deprecate_constant :HTTPSession
741747
# :startdoc:
742748

743749
# Returns +true+; retained for compatibility.

0 commit comments

Comments
 (0)