diff options
Diffstat (limited to 'spec/bundler/support/rubygems_version_manager.rb')
-rw-r--r-- | spec/bundler/support/rubygems_version_manager.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/bundler/support/rubygems_version_manager.rb b/spec/bundler/support/rubygems_version_manager.rb index 5653601ae8..88da14b67e 100644 --- a/spec/bundler/support/rubygems_version_manager.rb +++ b/spec/bundler/support/rubygems_version_manager.rb @@ -30,11 +30,10 @@ class RubygemsVersionManager rubygems_default_path = rubygems_path + "/defaults" bundler_path = rubylibdir + "/bundler" - bundler_exemptions = Gem.rubygems_version < Gem::Version.new("3.2.0") ? [bundler_path + "/errors.rb"] : [] bad_loaded_features = $LOADED_FEATURES.select do |loaded_feature| (loaded_feature.start_with?(rubygems_path) && !loaded_feature.start_with?(rubygems_default_path)) || - (loaded_feature.start_with?(bundler_path) && !bundler_exemptions.any? {|bundler_exemption| loaded_feature.start_with?(bundler_exemption) }) + loaded_feature.start_with?(bundler_path) end errors = if bad_loaded_features.any? @@ -66,7 +65,7 @@ class RubygemsVersionManager def switch_local_copy_if_needed return unless local_copy_switch_needed? - sys_exec("git checkout #{target_tag}", :dir => local_copy_path) + sys_exec("git checkout #{target_tag}", dir: local_copy_path) ENV["RGV"] = local_copy_path.to_s end @@ -85,7 +84,7 @@ class RubygemsVersionManager end def local_copy_tag - sys_exec("git rev-parse --abbrev-ref HEAD", :dir => local_copy_path) + sys_exec("git rev-parse --abbrev-ref HEAD", dir: local_copy_path) end def local_copy_path @@ -98,7 +97,7 @@ class RubygemsVersionManager rubygems_path = source_root.join("tmp/rubygems") unless rubygems_path.directory? - sys_exec("git clone .. #{rubygems_path}", :dir => source_root) + sys_exec("git clone .. #{rubygems_path}", dir: source_root) end rubygems_path |