mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Partly reverted be962ca0c411f3b4bcfebfb6e714c78cbad12775
* `Gem::ConfigMap` is still used by Bundler. * `Gem::RubyGemsVersion` is also still referred by the old gems. https://github.com/rubygems/rubygems/commit/249c3ff44f
This commit is contained in:
parent
2a81d3a26a
commit
77c0e23b0c
1 changed files with 38 additions and 0 deletions
38
lib/rubygems/compatibility.rb
Normal file
38
lib/rubygems/compatibility.rb
Normal file
|
@ -0,0 +1,38 @@
|
|||
# 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.
|
||||
#++
|
||||
|
||||
# TODO remove at RubyGems 4
|
||||
module Gem
|
||||
RubyGemsVersion = VERSION
|
||||
|
||||
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
|
||||
else
|
||||
RbConfigPriorities.each do |key|
|
||||
ConfigMap[key.to_sym] = RbConfig::CONFIG[key]
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Reference in a new issue