From 68ddd4d300e9a88737c4f37af74e1a0312949b2f Mon Sep 17 00:00:00 2001 From: hsbt Date: Sun, 14 Apr 2019 06:01:35 +0000 Subject: Merge Bundler 2.1.0.pre.1 as developed version from upstream. https://github.com/bundler/bundler/commit/a53709556b95a914e874b22ed2116a46b0528852 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/bundler/rubygems_ext.rb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'lib/bundler/rubygems_ext.rb') diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index e9f0eac355..ccf71c8c00 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -2,12 +2,6 @@ require "pathname" -if defined?(Gem::QuickLoader) - # Gem Prelude makes me a sad panda :'( - Gem::QuickLoader.load_full_rubygems_library -end - -require "rubygems" require "rubygems/specification" begin @@ -27,14 +21,16 @@ module Gem class Specification attr_accessor :remote, :location, :relative_loaded_from - if instance_methods(false).map(&:to_sym).include?(:source) + if instance_methods(false).include?(:source) remove_method :source attr_writer :source def source (defined?(@source) && @source) || Gem::Source::Installed.new end else + # rubocop:disable Lint/DuplicateMethods attr_accessor :source + # rubocop:enable Lint/DuplicateMethods end alias_method :rg_full_gem_path, :full_gem_path @@ -85,10 +81,7 @@ module Gem end end - # RubyGems 1.8+ used only. - methods = instance_methods(false) - gem_dir = methods.first.is_a?(String) ? "gem_dir" : :gem_dir - remove_method :gem_dir if methods.include?(gem_dir) + remove_method :gem_dir if instance_methods(false).include?(:gem_dir) def gem_dir full_gem_path end -- cgit v1.2.3