Skip to content

Commit 6f81834

Browse files
committed
Prevent warnings
``` /home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:32: warning: assigned but unused variable - e /home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:61: warning: assigned but unused variable - version /home/chkbuild/chkbuild/tmp/build/20240913T003003Z/ruby/test/net/http/utils.rb:124: warning: method redefined; discarding old query ```
1 parent e3285bd commit 6f81834

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/net/http/utils.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def start
2929
loop do
3030
socket = @ssl_server ? @ssl_server.accept : @server.accept
3131
run(socket)
32-
rescue => e
32+
rescue
3333
ensure
3434
socket.close if socket
3535
end
@@ -58,7 +58,7 @@ def handle_request(socket)
5858
request_line = socket.gets
5959
return if request_line.nil? || request_line.strip.empty?
6060

61-
method, path, version = request_line.split
61+
method, path, _version = request_line.split
6262
headers = {}
6363
while (line = socket.gets)
6464
break if line.strip.empty?
@@ -121,10 +121,6 @@ def continue
121121
@socket.write "HTTP\/1.1 100 continue\r\n\r\n"
122122
end
123123

124-
def query
125-
@query
126-
end
127-
128124
def remote_ip
129125
@socket.peeraddr[3]
130126
end

0 commit comments

Comments
 (0)