summaryrefslogtreecommitdiff
path: root/lib/bundler/rubygems_ext.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 06:01:35 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 06:01:35 +0000
commit68ddd4d300e9a88737c4f37af74e1a0312949b2f (patch)
tree787e1e83d76934ce039eb336995a8d5bb53a89e6 /lib/bundler/rubygems_ext.rb
parentd636809c057432e8d42abe30c6c6785eb0721d77 (diff)
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
Diffstat (limited to 'lib/bundler/rubygems_ext.rb')
-rw-r--r--lib/bundler/rubygems_ext.rb15
1 files changed, 4 insertions, 11 deletions
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