diff --git a/lib/ruby-lsp.rb b/lib/ruby-lsp.rb index d95debf6b9..0e15c5d2f5 100644 --- a/lib/ruby-lsp.rb +++ b/lib/ruby-lsp.rb @@ -4,9 +4,3 @@ module RubyLsp VERSION = File.read(File.expand_path("../VERSION", __dir__)).strip end - -module Prism - class ParseResult - extend T::Generic - end -end diff --git a/lib/ruby_lsp/internal.rb b/lib/ruby_lsp/internal.rb index 7aa48b34fa..c0d9fcb113 100644 --- a/lib/ruby_lsp/internal.rb +++ b/lib/ruby_lsp/internal.rb @@ -19,6 +19,14 @@ require "prism/visitor" require "language_server-protocol" +# Prism v0.26.0 introduced generics for ParseResult, but it causes some problems so the intention is to remove it. +# Once that is done, we can remove this patch. +module Prism + class ParseResult + extend T::Generic + end +end + require "ruby-lsp" require "ruby_lsp/base_server" require "ruby_indexer/ruby_indexer"