diff --git a/spec/websocket_handler_spec.cr b/spec/websocket_handler_spec.cr index 64f54898..123a9f9f 100644 --- a/spec/websocket_handler_spec.cr +++ b/spec/websocket_handler_spec.cr @@ -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", diff --git a/src/kemal/config.cr b/src/kemal/config.cr index 02065b4b..df7330a9 100644 --- a/src/kemal/config.cr +++ b/src/kemal/config.cr @@ -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