summaryrefslogtreecommitdiff
path: root/spec/support/hax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/hax.rb')
-rw-r--r--spec/support/hax.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/hax.rb b/spec/support/hax.rb
index 5e6acdc783..c8f78a34a1 100644
--- a/spec/support/hax.rb
+++ b/spec/support/hax.rb
@@ -11,7 +11,8 @@ module Gem
end
@platforms = [Gem::Platform::RUBY, Gem::Platform.local]
- if defined?(@path_to_default_spec_map) && !ENV["BUNDLER_SPEC_KEEP_DEFAULT_BUNDLER_GEM"]
+ # We only need this hack for rubygems versions without the BundlerVersionFinder
+ if Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0") || ENV["BUNDLER_SPEC_DISABLE_DEFAULT_BUNDLER_GEM"]
@path_to_default_spec_map.delete_if do |_path, spec|
spec.name == "bundler"
end