1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/rubygems/compatibility.rb
hsbt 8da8d4b043 Merge RubyGems 3.0.0.beta1.
* It drop to support < Ruby 2.2
  * Cleanup deprecated methods and classes.
  * Mark obsoleted methods to deprecate.
  * and other enhancements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-30 13:01:35 +00:00

40 lines
1,007 B
Ruby

# 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
]
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