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 64a03e9 commit 6c21adbCopy full SHA for 6c21adb
exe/ruby-lsp-launcher
@@ -83,8 +83,13 @@ begin
83
# This Marshal load can only happen after requiring Bundler because it will load a custom error class from Bundler
84
# itself. If we try to load before requiring, the class will not be defined and loading will fail
85
error_path = File.join(".ruby-lsp", "install_error")
86
- install_error = if File.exist?(error_path)
87
- Marshal.load(File.read(error_path))
+ install_error = begin
+ Marshal.load(File.read(error_path)) if File.exist?(error_path)
88
+ rescue ArgumentError
89
+ # The class we tried to load is not defined. This might happen when the user upgrades Bundler and new error
90
+ # classes are introduced or removed
91
+ File.delete(error_path)
92
+ nil
93
end
94
95
Bundler.setup
0 commit comments