summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-08-05 16:54:30 +0200
committergit <svn-admin@ruby-lang.org>2021-11-25 04:02:21 +0900
commitb2b473707f0010055a8df8cc5f83905a73dda871 (patch)
treec3e69f890e8ea8acda7828c2bfb1594af8297cb3 /spec
parentd49ee9e2c3cfdf1a705da32019694ecfd00dd1e6 (diff)
[rubygems/rubygems] Check not having load system features also for successful runs
https://github.com/rubygems/rubygems/commit/4807bd19a5
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/support/rubygems_version_manager.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/bundler/support/rubygems_version_manager.rb b/spec/bundler/support/rubygems_version_manager.rb
index fe6bf246b5..d1b1f8dd03 100644
--- a/spec/bundler/support/rubygems_version_manager.rb
+++ b/spec/bundler/support/rubygems_version_manager.rb
@@ -24,12 +24,6 @@ class RubygemsVersionManager
def assert_system_features_not_loaded!
at_exit do
- errors = if $!.nil?
- ""
- else
- all_commands_output
- end
-
rubylibdir = RbConfig::CONFIG["rubylibdir"]
rubygems_path = rubylibdir + "/rubygems"
@@ -43,11 +37,11 @@ class RubygemsVersionManager
(loaded_feature.start_with?(bundler_path) && !bundler_exemptions.any? {|bundler_exemption| loaded_feature.start_with?(bundler_exemption) })
end
- if bad_loaded_features.any?
- errors += "the following features were incorrectly loaded:\n#{bad_loaded_features.join("\n")}"
+ errors = if bad_loaded_features.any?
+ all_commands_output + "the following features were incorrectly loaded:\n#{bad_loaded_features.join("\n")}"
end
- raise errors unless errors.empty?
+ raise errors if errors
end
end