Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Simplify rubygems integration
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Apr 23, 2019
1 parent b7275aa commit 24424cd
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions lib/bundler/rubygems_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,27 +304,17 @@ def reverse_rubygems_kernel_mixin
end
end

if provides?(">= 2.5.2")
# RubyGems-generated binstubs call Kernel#gem
def binstubs_call_gem?
false
end

# only 2.5.2+ has all of the stub methods we want to use, and since this
# is a performance optimization _only_,
# we'll restrict ourselves to the most
# recent RG versions instead of all versions that have stubs
def stubs_provide_full_functionality?
true
end
else
def binstubs_call_gem?
true
end
# RubyGems-generated binstubs call Kernel#gem
def binstubs_call_gem?
!provides?(">= 2.5.2")
end

def stubs_provide_full_functionality?
false
end
# only 2.5.2+ has all of the stub methods we want to use, and since this
# is a performance optimization _only_,
# we'll restrict ourselves to the most
# recent RG versions instead of all versions that have stubs
def stubs_provide_full_functionality?
provides?(">= 2.5.2")
end

def replace_gem(specs, specs_by_name)
Expand Down

0 comments on commit 24424cd

Please sign in to comment.