From 5335ce0e060c7a2a0b01c57f8f8a64254f2658e1 Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 21 Nov 2018 10:20:47 +0000 Subject: Merge master branch from rubygems/rubygems upstream. * Enable Style/MethodDefParentheses in Rubocop https://github.com/rubygems/rubygems/pull/2478 * Enable Style/MultilineIfThen in Rubocop https://github.com/rubygems/rubygems/pull/2479 * Fix required_ruby_version with prereleases and improve error message https://github.com/rubygems/rubygems/pull/2344 * Fix bundler rubygems binstub not properly looking for bundler https://github.com/rubygems/rubygems/pull/2426 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems/resolver/vendor_set.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/rubygems/resolver/vendor_set.rb') diff --git a/lib/rubygems/resolver/vendor_set.rb b/lib/rubygems/resolver/vendor_set.rb index f30ce534af..7e2e917d5c 100644 --- a/lib/rubygems/resolver/vendor_set.rb +++ b/lib/rubygems/resolver/vendor_set.rb @@ -32,7 +32,7 @@ class Gem::Resolver::VendorSet < Gem::Resolver::Set # Adds a specification to the set with the given +name+ which has been # unpacked into the given +directory+. - def add_vendor_gem name, directory # :nodoc: + def add_vendor_gem(name, directory) # :nodoc: gemspec = File.join directory, "#{name}.gemspec" spec = Gem::Specification.load gemspec @@ -52,7 +52,7 @@ class Gem::Resolver::VendorSet < Gem::Resolver::Set # Returns an Array of VendorSpecification objects matching the # DependencyRequest +req+. - def find_all req + def find_all(req) @specs.values.select do |spec| req.match? spec end.map do |spec| @@ -65,11 +65,11 @@ class Gem::Resolver::VendorSet < Gem::Resolver::Set # Loads a spec with the given +name+. +version+, +platform+ and +source+ are # ignored. - def load_spec name, version, platform, source # :nodoc: + def load_spec(name, version, platform, source) # :nodoc: @specs.fetch name end - def pretty_print q # :nodoc: + def pretty_print(q) # :nodoc: q.group 2, '[VendorSet', ']' do next if @directories.empty? q.breakable @@ -85,4 +85,3 @@ class Gem::Resolver::VendorSet < Gem::Resolver::Set end end - -- cgit v1.2.3