aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-06 12:13:16 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-06 12:13:16 +0000
commit9d0441696aabc7fc5ab3ecf01c3783e16db079e8 (patch)
tree04f0526ea37979059385b3e5c704d1d99ba8adde /lib/net
parentac8084ea435059257ea5920ff07f31bbf54d5574 (diff)
downloadruby-9d0441696aabc7fc5ab3ecf01c3783e16db079e8.tar.gz
Use `Net::HTTPClientException` instead of `Net::HTTPServerException`
`Net::HTTPServerException` has been deprecated since r63590. [Bug #14688] And `net/http/responses.rb` uses the deprecated constant, so Ruby warns of the deprecation. Example: ```bash $ ruby -r net/http -e '' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/net/http/responses.rb:22: warning: constant Net::HTTPServerException is deprecated ``` This change suppresses the warning. From: Masataka Pocke Kuwabara <kuwabara@pocke.me> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/http/responses.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb
index 55ae97d95d..50352032df 100644
--- a/lib/net/http/responses.rb
+++ b/lib/net/http/responses.rb
@@ -19,7 +19,7 @@ class Net::HTTPRedirection < Net::HTTPResponse # 3xx
end
class Net::HTTPClientError < Net::HTTPResponse # 4xx
HAS_BODY = true
- EXCEPTION_TYPE = Net::HTTPServerException # for backward compatibility
+ EXCEPTION_TYPE = Net::HTTPClientException # for backward compatibility
end
class Net::HTTPServerError < Net::HTTPResponse # 5xx
HAS_BODY = true