Skip to content

Commit f8ea32f

Browse files
committed
wip
1 parent 62660b9 commit f8ea32f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ruby_lsp/ruby_lsp_rails/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def execute(request, params)
8383

8484
sig { params(name: String).returns(T::Hash[Symbol, T.untyped]) }
8585
def route_location(name)
86-
key = name.match(/^([a-zA-Z0-9_]+)(_path|_url)$/)[1]
86+
key = T.must(name.match(/^([a-zA-Z0-9_]+)(_path|_url)$/))[1]
8787

8888
# A token could match the _path or _url pattern, but not be an actual route.
8989
unless ::Rails.application.routes.named_routes.key?(key)

0 commit comments

Comments
 (0)