Sha256: 27c4054bd31413a190e29a0298a1e4f9ceff8b39227726f22c3168f77a8b342e

Contents?: true

Size: 1 KB

Versions: 41

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

#--
# 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.
#
# TODO remove at RubyGems 4
#++

module Gem
  # :stopdoc:

  RubyGemsVersion = VERSION
  deprecate_constant(:RubyGemsVersion)

  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|
      cm[key] = RbConfig::CONFIG[key.to_s]
    end
    deprecate_constant(:ConfigMap)
  else
    RbConfigPriorities.each do |key|
      ConfigMap[key.to_sym] = RbConfig::CONFIG[key]
    end
  end

end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
rubygems-update-3.3.27 lib/rubygems/compatibility.rb
rubygems-update-3.4.22 lib/rubygems/compatibility.rb
rubygems-update-3.4.21 lib/rubygems/compatibility.rb
rubygems-update-3.4.20 lib/rubygems/compatibility.rb
rubygems-update-3.4.19 lib/rubygems/compatibility.rb
rubygems-update-3.4.18 lib/rubygems/compatibility.rb
rubygems-update-3.4.17 lib/rubygems/compatibility.rb
rubygems-update-3.4.16 lib/rubygems/compatibility.rb
rubygems-update-3.4.15 lib/rubygems/compatibility.rb
rubygems-update-3.4.14 lib/rubygems/compatibility.rb
rubygems-update-3.4.13 lib/rubygems/compatibility.rb
rubygems-update-3.4.12 lib/rubygems/compatibility.rb
rubygems-update-3.4.11 lib/rubygems/compatibility.rb
rubygems-update-3.4.10 lib/rubygems/compatibility.rb
rubygems-update-3.4.9 lib/rubygems/compatibility.rb
rubygems-update-3.4.8 lib/rubygems/compatibility.rb
rubygems-update-3.4.7 lib/rubygems/compatibility.rb
rubygems-update-3.4.6 lib/rubygems/compatibility.rb
rubygems-update-3.4.5 lib/rubygems/compatibility.rb
rubygems-update-3.4.4 lib/rubygems/compatibility.rb