Skip to content

Commit 82cf54b

Browse files
smasatomame
authored andcommitted
Only load what is required from cgi
In Ruby 3.5 most of the `cgi` gem will be removed. Only the various escape/unescape methods will be retained by default. On older versions, `require "cgi/util"` is needed because the unescape* methods don't work otherwise. https://bugs.ruby-lang.org/issues/21258
1 parent 8f7e855 commit 82cf54b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/typeprof/lsp/server.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
require "cgi"
1+
require "cgi/escape"
2+
require "cgi/util" if RUBY_VERSION < "3.5"
23

34
module TypeProf::LSP
45
module ErrorCodes

0 commit comments

Comments
 (0)