From ded64f437e6e66601d120c7630d0c1dc0e99ccb4 Mon Sep 17 00:00:00 2001 From: Georg Ledermann Date: Tue, 21 Jan 2025 09:27:25 +0100 Subject: [PATCH] Regenerate bin/bundle --- bin/bundle | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/bin/bundle b/bin/bundle index 574c714b..44e30bbd 100755 --- a/bin/bundle +++ b/bin/bundle @@ -29,7 +29,7 @@ m = update_index = nil ARGV.each_with_index do |a, i| if update_index && update_index.succ == i && - a =~ Gem::Version::ANCHORED_VERSION_PATTERN + a.match?(Gem::Version::ANCHORED_VERSION_PATTERN) bundler_version = a end unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ @@ -45,14 +45,14 @@ m = gemfile = ENV['BUNDLE_GEMFILE'] return gemfile if gemfile && !gemfile.empty? - File.expand_path('../../Gemfile', __FILE__) + File.expand_path('../Gemfile', __dir__) end def lockfile lockfile = case File.basename(gemfile) when 'gems.rb' - gemfile.sub(/\.rb$/, gemfile) + gemfile.sub(/\.rb$/, '.locked') else "#{gemfile}.lock" end @@ -80,15 +80,7 @@ m = bundler_gem_version = Gem::Version.new(version) - requirement = bundler_gem_version.approximate_recommendation - - unless Gem::Version.new(Gem::VERSION) < Gem::Version.new('2.7.0') - return requirement - end - - requirement += '.a' if bundler_gem_version.prerelease? - - requirement + bundler_gem_version.approximate_recommendation end def load_bundler!