[rubygems/rubygems] util/rubocop -A --only Style/RedundantBegin

b595d3cf0f
This commit is contained in:
Hiroshi SHIBATA 2023-03-16 14:10:30 +09:00
parent a532e9dc37
commit 72d09a568f
16 changed files with 148 additions and 188 deletions

View file

@ -162,13 +162,11 @@ class Gem::DependencyInstaller
specs = []
tuples.each do |tup, source|
begin
spec = source.fetch_spec(tup)
rescue Gem::RemoteFetcher::FetchError => e
errors << Gem::SourceFetchProblem.new(source, e)
else
specs << [spec, source]
end
spec = source.fetch_spec(tup)
rescue Gem::RemoteFetcher::FetchError => e
errors << Gem::SourceFetchProblem.new(source, e)
else
specs << [spec, source]
end
if @errors
@ -294,11 +292,9 @@ class Gem::DependencyInstaller
version = src.spec.version if version == Gem::Requirement.default
elsif dep_or_name =~ /\.gem$/
Dir[dep_or_name].each do |name|
begin
src = Gem::Source::SpecificFile.new name
installer_set.add_local dep_or_name, src.spec, src
rescue Gem::Package::FormatError
end
src = Gem::Source::SpecificFile.new name
installer_set.add_local dep_or_name, src.spec, src
rescue Gem::Package::FormatError
end
# else This is a dependency. InstallerSet handles this case
end