We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62660b9 commit f8ea32fCopy full SHA for f8ea32f
lib/ruby_lsp/ruby_lsp_rails/server.rb
@@ -83,7 +83,7 @@ def execute(request, params)
83
84
sig { params(name: String).returns(T::Hash[Symbol, T.untyped]) }
85
def route_location(name)
86
- key = name.match(/^([a-zA-Z0-9_]+)(_path|_url)$/)[1]
+ key = T.must(name.match(/^([a-zA-Z0-9_]+)(_path|_url)$/))[1]
87
88
# A token could match the _path or _url pattern, but not be an actual route.
89
unless ::Rails.application.routes.named_routes.key?(key)
0 commit comments