summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-28 11:11:53 +0800
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-28 11:11:53 +0800
commitefbd2ed35bb30301eb12db5255d1162d01be71b4 (patch)
treeb90c2ca53df282b15397d6eea4cdec93b63ba000
parentd875be710a1a5cccacdcc8eea4ffd49c1f036bb8 (diff)
downloadbundler-efbd2ed35bb30301eb12db5255d1162d01be71b4.tar.gz
Use RbConfig::CONFIG directly instead of Gem::ConfigMap.
Gem::ConfigMap is compatibility code for the old Ruby like 1.8/1.9.
-rw-r--r--lib/bundler/rubygems_integration.rb2
-rw-r--r--spec/support/path.rb5
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index dcf0007ca2..b8b84117d4 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -214,7 +214,7 @@ module Bundler
end
def config_map
- Gem::ConfigMap
+ RbConfig::CONFIG
end
def clear_paths
diff --git a/spec/support/path.rb b/spec/support/path.rb
index ca05ef5e3b..993776af05 100644
--- a/spec/support/path.rb
+++ b/spec/support/path.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require "pathname"
+require "rbconfig"
module Spec
module Path
@@ -32,7 +33,7 @@ module Spec
if Bundler::VERSION.split(".").first.to_i < 3
system_gem_path(*path)
else
- bundled_app(*[".bundle", ENV.fetch("BUNDLER_SPEC_RUBY_ENGINE", Gem.ruby_engine), Gem::ConfigMap[:ruby_version], *path].compact)
+ bundled_app(*[".bundle", ENV.fetch("BUNDLER_SPEC_RUBY_ENGINE", Gem.ruby_engine), RbConfig::CONFIG[:ruby_version], *path].compact)
end
end
@@ -51,7 +52,7 @@ module Spec
end
def vendored_gems(path = nil)
- bundled_app(*["vendor/bundle", Gem.ruby_engine, Gem::ConfigMap[:ruby_version], path].compact)
+ bundled_app(*["vendor/bundle", Gem.ruby_engine, RbConfig::CONFIG[:ruby_version], path].compact)
end
def cached_gem(path)