2016-02-01 07:43:26 -05:00
|
|
|
# frozen_string_literal: true
|
2013-01-24 20:04:18 -05:00
|
|
|
# :stopdoc:
|
|
|
|
|
2013-02-05 15:52:28 -05:00
|
|
|
#--
|
2012-11-29 01:52:18 -05:00
|
|
|
# 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.
|
2013-02-05 16:06:14 -05:00
|
|
|
#
|
2012-11-29 01:52:18 -05:00
|
|
|
# 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.
|
2013-02-05 15:52:28 -05:00
|
|
|
#++
|
2012-11-29 01:52:18 -05:00
|
|
|
|
|
|
|
module Gem
|
|
|
|
RubyGemsVersion = VERSION
|
|
|
|
|
2014-01-06 20:19:28 -05:00
|
|
|
# TODO remove at RubyGems 3
|
|
|
|
|
2012-11-29 01:52:18 -05:00
|
|
|
RbConfigPriorities = %w[
|
2013-10-15 20:14:16 -04:00
|
|
|
MAJOR
|
|
|
|
MINOR
|
|
|
|
TEENY
|
2012-11-29 01:52:18 -05:00
|
|
|
EXEEXT RUBY_SO_NAME arch bindir datadir libdir ruby_install_name
|
|
|
|
ruby_version rubylibprefix sitedir sitelibdir vendordir vendorlibdir
|
|
|
|
rubylibdir
|
2018-10-21 20:27:02 -04:00
|
|
|
].freeze
|
2012-11-29 01:52:18 -05:00
|
|
|
|
|
|
|
unless defined?(ConfigMap)
|
|
|
|
##
|
|
|
|
# Configuration settings from ::RbConfig
|
2014-01-06 20:19:28 -05:00
|
|
|
ConfigMap = Hash.new do |cm, key| # TODO remove at RubyGems 3
|
2012-11-29 01:52:18 -05:00
|
|
|
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
|