diff options
author | Yusuke Endoh <[email protected]> | 2024-09-13 11:30:24 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-09-13 02:39:11 +0000 |
commit | 6ae05584bdceb8e8fc5db248d8f4fa7e2c8022c7 (patch) | |
tree | 7544b13d270bc714eb8b4961a181818a17b6dc37 /test/net/http | |
parent | 5e3f1b6a6d64598982219644edfa9c3da09bafed (diff) |
[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
Diffstat (limited to 'test/net/http')
-rw-r--r-- | test/net/http/utils.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb index cb621da998..1d43497af0 100644 --- a/test/net/http/utils.rb +++ b/test/net/http/utils.rb @@ -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 |