Skip to content

Commit

Permalink
Prevent warnings
Browse files Browse the repository at this point in the history
```
/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
```
  • Loading branch information
mame committed Sep 13, 2024
1 parent e3285bd commit 6f81834
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/net/http/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def start
loop do
socket = @ssl_server ? @ssl_server.accept : @server.accept
run(socket)
rescue => e
rescue
ensure
socket.close if socket
end
Expand Down Expand Up @@ -58,7 +58,7 @@ def handle_request(socket)
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?
Expand Down Expand Up @@ -121,10 +121,6 @@ def continue
@socket.write "HTTP\/1.1 100 continue\r\n\r\n"
end

def query
@query
end

def remote_ip
@socket.peeraddr[3]
end
Expand Down

0 comments on commit 6f81834

Please sign in to comment.