summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-23 18:31:48 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-23 21:10:50 +0200
commitc0f4d4ec55d590ba98cda54be3faf47bbb92af1b (patch)
tree6f5b4ae66654a679492f4a4305b196d846411b60
parentb3f692588b75451d4260f90db7fac46461569e87 (diff)
downloadbundler-c0f4d4ec55d590ba98cda54be3faf47bbb92af1b.tar.gz
Simplify rubygems integrationtweak_rubygems_integration
-rw-r--r--lib/bundler/rubygems_integration.rb30
1 files changed, 10 insertions, 20 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 6dea944e83..81bac3540e 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -304,27 +304,17 @@ module Bundler
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)