diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-27 22:35:20 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-28 00:11:02 +0200 |
commit | 8cb8ddb8fba5018089efbb10877c5bac825e5a98 (patch) | |
tree | 6796f53468760b0edd880635a9a1d9a899c88e60 | |
parent | 2a59f170153530e84119d6b0c418f1bfdc5bfdae (diff) | |
download | bundler-8cb8ddb8fba5018089efbb10877c5bac825e5a98.tar.gz |
Remove more compatibility code
`stubs_for` was introduced with rubygems 2.5.0, the oldest version we
support.
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 5763a630fa..ae1c1943e5 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -625,16 +625,8 @@ module Bundler end end - if Gem::Specification.respond_to?(:stubs_for) - def find_name(name) - Gem::Specification.stubs_for(name).map(&:to_spec) - end - else - def find_name(name) - Gem::Specification.stubs.find_all do |spec| - spec.name == name - end.map(&:to_spec) - end + def find_name(name) + Gem::Specification.stubs_for(name).map(&:to_spec) end if Gem::Specification.respond_to?(:default_stubs) |