[rubygems/rubygems] Don't rescue Exception when evaluating Gemfile

Things like OOM, or StackOverflow should be raised immediately.

https://github.com/rubygems/rubygems/commit/11691ce492
This commit is contained in:
David Rodríguez 2024-09-05 16:12:46 +02:00 committed by git
parent f0b9baa2d6
commit 1d72b3bd1a

View File

@ -45,7 +45,7 @@ module Bundler
with_gemfile(gemfile) do |current_gemfile|
contents ||= Bundler.read_file(current_gemfile)
instance_eval(contents, current_gemfile, 1)
rescue Exception => e # rubocop:disable Lint/RescueException
rescue StandardError, ScriptError => e
message = "There was an error " \
"#{e.is_a?(GemfileEvalError) ? "evaluating" : "parsing"} " \
"`#{File.basename current_gemfile}`: #{e.message}"