[前][次][番号順一覧][スレッド一覧]

ruby-changes:56732

From: Hiroshi <ko1@a...>
Date: Thu, 1 Aug 2019 00:25:16 +0900 (JST)
Subject: [ruby-changes:56732] Hiroshi SHIBATA: 77c0e23b0c (master): [rubygems/rubygems] Partly reverted be962ca0c411f3b4bcfebfb6e714c78cbad12775

https://git.ruby-lang.org/ruby.git/commit/?id=77c0e23b0c

From 77c0e23b0c28f543e1fb4fbf20cae216be0398f9 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Sun, 28 Jul 2019 09:59:07 +0800
Subject: [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

diff --git a/lib/rubygems/compatibility.rb b/lib/rubygems/compatibility.rb
new file mode 100644
index 0000000..9238dee
--- /dev/null
+++ b/lib/rubygems/compatibility.rb
@@ -0,0 +1,38 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems/compatibility.rb#L1
+# 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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]