Fix issues found by ameba

This commit is contained in:
Sijawusz Pur Rahnama 2023-12-27 02:34:01 +01:00 committed by GitHub
parent ad3f06417b
commit 774de634aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@ describe "Kemal::WebSocketHandler" do
it "fetches named url parameters" do
handler = Kemal::WebSocketHandler::INSTANCE
ws "/:id" { |_, c| c.ws_route_lookup.params["id"] }
ws "/:id" { |_, context| context.ws_route_lookup.params["id"] }
headers = HTTP::Headers{
"Upgrade" => "websocket",
"Connection" => "Upgrade",

View file

@ -159,8 +159,8 @@ module Kemal
end
private def setup_filter_handlers
FILTER_HANDLERS.each do |h|
HANDLERS.insert(@handler_position, h)
FILTER_HANDLERS.each do |handler|
HANDLERS.insert(@handler_position, handler)
end
end
end