Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem::BundlerVersionFinder.bundler_version
bundler_version
lib/rubygems/bundler_version_finder.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/bundler_version_finder.rb, line 6
def self.bundler_version
bcv = bundle_config_version
return if bcv == "system"
v = ENV["BUNDLER_VERSION"]
v = nil if v&.empty?
v ||= bundle_update_bundler_version
return if v == true
v ||= bcv unless bcv == "lockfile"
v ||= lockfile_version
return unless v
# A config file is arbitrary YAML, so BUNDLE_VERSION can be a date, a
# mapping, or anything else the parser makes of an unquoted scalar. None
# of those name a version, and refusing to prioritize is better than
# raising out of every command that resolves bundler by name.
return unless Gem::Version.correct?(v)
Gem::Version.new(v)
end
No documentation available
See also
.bundle_config_version
.bundle_update_bundler_version
.gemfile_path
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0