Sha256: 6d05397b3c84964bb92556e03659d17b0477b9ce5c7edebe1644f01f85521f5d

Contents?: true

Size: 1014 Bytes

Versions: 9

Compression:

Stored size: 1014 Bytes

Contents

# frozen_string_literal: true
# :stopdoc:

#--
# This file contains all sorts of little compatibility hacks that we've
# had to introduce over the years. Quarantining them into one file helps
# us know when we can get rid of them.
#
# Ruby 1.9.x has introduced some things that are awkward, and we need to
# support them, so we define some constants to use later.
#++

module Gem
  RubyGemsVersion = VERSION

  # TODO remove at RubyGems 3

  RbConfigPriorities = %w[
    MAJOR
    MINOR
    TEENY
    EXEEXT RUBY_SO_NAME arch bindir datadir libdir ruby_install_name
    ruby_version rubylibprefix sitedir sitelibdir vendordir vendorlibdir
    rubylibdir
  ].freeze

  unless defined?(ConfigMap)
    ##
    # Configuration settings from ::RbConfig
    ConfigMap = Hash.new do |cm, key| # TODO remove at RubyGems 3
      cm[key] = RbConfig::CONFIG[key.to_s]
    end
  else
    RbConfigPriorities.each do |key|
      ConfigMap[key.to_sym] = RbConfig::CONFIG[key]
    end
  end

  RubyGemsPackageVersion = VERSION
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubygems-update-3.0.9 lib/rubygems/compatibility.rb
rubygems-update-3.0.8 lib/rubygems/compatibility.rb
rubygems-update-3.0.7 lib/rubygems/compatibility.rb
rubygems-update-3.0.6 lib/rubygems/compatibility.rb
rubygems-update-3.0.4 lib/rubygems/compatibility.rb
rubygems-update-3.0.3 lib/rubygems/compatibility.rb
rubygems-update-3.0.2 lib/rubygems/compatibility.rb
rubygems-update-3.0.1 lib/rubygems/compatibility.rb
rubygems-update-3.0.0 lib/rubygems/compatibility.rb