[ruby/net-http] 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
```

https://github.com/ruby/net-http/commit/6f818346ce
This commit is contained in:
Yusuke Endoh 2024-09-13 11:30:24 +09:00 коммит произвёл git
Родитель 5e3f1b6a6d
Коммит 6ae05584bd
1 изменённых файлов: 2 добавлений и 6 удалений

Просмотреть файл

@ -29,7 +29,7 @@ module TestNetHTTPUtils
loop do
socket = @ssl_server ? @ssl_server.accept : @server.accept
run(socket)
rescue => e
rescue
ensure
socket.close if socket
end
@ -58,7 +58,7 @@ module TestNetHTTPUtils
request_line = socket.gets
return if request_line.nil? || request_line.strip.empty?
method, path, version = request_line.split
method, path, _version = request_line.split
headers = {}
while (line = socket.gets)
break if line.strip.empty?
@ -121,10 +121,6 @@ module TestNetHTTPUtils
@socket.write "HTTP\/1.1 100 continue\r\n\r\n"
end
def query
@query
end
def remote_ip
@socket.peeraddr[3]
end