-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RDoc overrides class name by the assigned name unexpectedly when assigned using a qualified class path.
- Loading branch information
Showing
2 changed files
with
255 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
# frozen_string_literal: false | ||
# Net::HTTP exception class. | ||
# You cannot use Net::HTTPExceptions directly; instead, you must use | ||
# its subclasses. | ||
module Net::HTTPExceptions | ||
def initialize(msg, res) #:nodoc: | ||
super msg | ||
@response = res | ||
module Net | ||
# Net::HTTP exception class. | ||
# You cannot use Net::HTTPExceptions directly; instead, you must use | ||
# its subclasses. | ||
module HTTPExceptions | ||
def initialize(msg, res) #:nodoc: | ||
super msg | ||
@response = res | ||
end | ||
attr_reader :response | ||
alias data response #:nodoc: obsolete | ||
end | ||
attr_reader :response | ||
alias data response #:nodoc: obsolete | ||
end | ||
class Net::HTTPError < Net::ProtocolError | ||
include Net::HTTPExceptions | ||
end | ||
class Net::HTTPRetriableError < Net::ProtoRetriableError | ||
include Net::HTTPExceptions | ||
end | ||
class Net::HTTPClientException < Net::ProtoServerError | ||
include Net::HTTPExceptions | ||
end | ||
|
||
# for compatibility | ||
Net::HTTPServerException = Net::HTTPClientException # :nodoc: | ||
# We cannot use the name "HTTPServerError", it is the name of the response. | ||
class HTTPError < ProtocolError | ||
include HTTPExceptions | ||
end | ||
|
||
class Net::HTTPFatalError < Net::ProtoFatalError | ||
include Net::HTTPExceptions | ||
end | ||
class HTTPRetriableError < ProtoRetriableError | ||
include HTTPExceptions | ||
end | ||
|
||
module Net | ||
class HTTPClientException < ProtoServerError | ||
include HTTPExceptions | ||
end | ||
|
||
class HTTPFatalError < ProtoFatalError | ||
include HTTPExceptions | ||
end | ||
|
||
# We cannot use the name "HTTPServerError", it is the name of the response. | ||
HTTPServerException = HTTPClientException # :nodoc: | ||
deprecate_constant(:HTTPServerException) | ||
end |
Oops, something went wrong.