summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-07-05 17:25:42 +0900
committergit <svn-admin@ruby-lang.org>2024-07-08 04:53:12 +0000
commit09c52b91b9f288cf75aed854a34d429e628774ca (patch)
tree4c9619ffa9b8686786bcf4be33566348e87a333d
parent61e00856c99eadbb1fd31c432a68783ecddbab4a (diff)
[ruby/open-uri] Removed needless class definition and variables
https://github.com/ruby/open-uri/commit/ab0e916997
-rw-r--r--test/open-uri/test_ssl.rb3
-rw-r--r--test/open-uri/utils.rb4
2 files changed, 2 insertions, 5 deletions
diff --git a/test/open-uri/test_ssl.rb b/test/open-uri/test_ssl.rb
index 019186fe82..cc0a7517ef 100644
--- a/test/open-uri/test_ssl.rb
+++ b/test/open-uri/test_ssl.rb
@@ -9,9 +9,6 @@ rescue LoadError
end
class TestOpenURISSL < Test::Unit::TestCase
-end
-
-class TestOpenURISSL
include TestOpenURIUtils
def setup
diff --git a/test/open-uri/utils.rb b/test/open-uri/utils.rb
index 88b0797904..464de5e334 100644
--- a/test/open-uri/utils.rb
+++ b/test/open-uri/utils.rb
@@ -50,7 +50,7 @@ class SimpleHTTPServer
@log << "ERROR `#{path}' not found"
client.print "HTTP/1.1 404 Not Found\r\nContent-Length: 0\r\n\r\n"
end
- rescue ::TestOpenURI::Unauthorized => e
+ rescue ::TestOpenURI::Unauthorized
@log << "ERROR Unauthorized"
client.print "HTTP/1.1 401 Unauthorized\r\nContent-Length: 0\r\n\r\n"
end
@@ -286,7 +286,7 @@ class SimpleHTTPSServer
request_line = socket.gets
return if request_line.nil? || request_line.strip.empty?
- method, path, version = request_line.split
+ _, path, _ = request_line.split
headers = {}
while (line = socket.gets)
break if line.strip.empty?