Flowdock
method

bundle_update_bundler_version

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: BundlerVersionFinder
bundle_update_bundler_version() private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/bundler_version_finder.rb, line 47
  def self.bundle_update_bundler_version
    return unless File.basename($0) == "bundle".freeze
    return unless "update".start_with?(ARGV.first || " ")
    bundler_version = nil
    update_index = nil
    ARGV.each_with_index do |a, i|
      if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
        bundler_version = a
      end
      next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
      bundler_version = $1 || true
      update_index = i
    end
    bundler_version
  end
Register or log in to add new notes.