[rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offenses

https://github.com/rubygems/rubygems/commit/d4fc383497
This commit is contained in:
David Rodríguez 2019-08-22 17:36:29 +02:00 committed by Hiroshi SHIBATA
parent 0b9b0774c3
commit d9e6315177
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2
12 changed files with 22 additions and 22 deletions

View File

@ -206,8 +206,8 @@ class Gem::BasicSpecification
def internal_init # :nodoc:
@extension_dir = nil
@full_gem_path = nil
@gem_dir = nil
@full_gem_path = nil
@gem_dir = nil
@ignored = nil
end

View File

@ -140,7 +140,7 @@ class Gem::Dependency
if defined?(@version_requirement) && @version_requirement
version = @version_requirement.instance_variable_get :@version
@version_requirement = nil
@version_requirement = nil
@version_requirements = Gem::Requirement.new version
end
@ -266,7 +266,7 @@ class Gem::Dependency
end
default = Gem::Requirement.default
self_req = self.requirement
self_req = self.requirement
other_req = other.requirement
return self.class.new name, self_req if other_req == default

View File

@ -88,14 +88,14 @@ class Gem::DependencyInstaller
@wrappers = options[:wrappers]
@build_args = options[:build_args]
@build_docs_in_background = options[:build_docs_in_background]
@install_as_default = options[:install_as_default]
@dir_mode = options[:dir_mode]
@data_mode = options[:data_mode]
@prog_mode = options[:prog_mode]
@install_as_default = options[:install_as_default]
@dir_mode = options[:dir_mode]
@data_mode = options[:data_mode]
@prog_mode = options[:prog_mode]
# Indicates that we should not try to update any deps unless
# we absolutely must.
@minimal_deps = options[:minimal_deps]
@minimal_deps = options[:minimal_deps]
@available = nil
@installed_gems = []

View File

@ -108,7 +108,7 @@ class Gem::Ext::Builder
@build_args = build_args
@gem_dir = spec.full_gem_path
@ran_rake = false
@ran_rake = false
end
##

View File

@ -698,7 +698,7 @@ class Gem::Installer
@development = options[:development]
@build_root = options[:build_root]
@build_args = options[:build_args] || Gem::Command.build_args
@build_args = options[:build_args] || Gem::Command.build_args
unless @build_root.nil?
require 'pathname'

View File

@ -190,8 +190,8 @@ class Gem::Specification < Gem::BasicSpecification
# Sentinel object to represent "not found" stubs
NOT_FOUND = Struct.new(:to_spec, :this).new # :nodoc:
@@spec_with_requirable_file = {}
@@active_stub_with_requirable_file = {}
@@spec_with_requirable_file = {}
@@active_stub_with_requirable_file = {}
######################################################################
# :section: Required gemspec attributes
@ -1230,8 +1230,8 @@ class Gem::Specification < Gem::BasicSpecification
@@all = nil
@@stubs = nil
@@stubs_by_name = {}
@@spec_with_requirable_file = {}
@@active_stub_with_requirable_file = {}
@@spec_with_requirable_file = {}
@@active_stub_with_requirable_file = {}
_clear_load_cache
unresolved = unresolved_deps
unless unresolved.empty?

View File

@ -392,7 +392,7 @@ class Gem::Version
def _split_segments
string_start = _segments.index {|s| s.is_a?(String) }
string_segments = segments
string_segments = segments
numeric_segments = string_segments.slice!(0, string_start || string_segments.size)
return numeric_segments, string_segments
end

View File

@ -670,7 +670,7 @@ ERROR: Possible alternatives: non_existent_with_hint
@cmd.options[:args] = [a2.name]
gemdir = File.join @gemhome, 'specifications'
gemdir = File.join @gemhome, 'specifications'
a2_gemspec = File.join(gemdir, "a-2.gemspec")
a1_gemspec = File.join(gemdir, "a-1.gemspec")

View File

@ -222,7 +222,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
lib_bundler = File.join lib, 'bundler'
lib_rubygems_defaults = File.join lib_rubygems, 'defaults'
securerandom_rb = File.join lib, 'securerandom.rb'
securerandom_rb = File.join lib, 'securerandom.rb'
engine_defaults_rb = File.join lib_rubygems_defaults, 'jruby.rb'
os_defaults_rb = File.join lib_rubygems_defaults, 'operating_system.rb'

View File

@ -87,7 +87,7 @@ class TestGemCommandsSigninCommand < Gem::TestCase
fetcher.data[data_key] = response
Gem::RemoteFetcher.fetcher = fetcher
sign_in_ui = ui_stub || Gem::MockGemUi.new("#{email}\n#{password}\n")
sign_in_ui = ui_stub || Gem::MockGemUi.new("#{email}\n#{password}\n")
use_ui sign_in_ui do
yield

View File

@ -32,7 +32,7 @@ class TestGemDependencyInstaller < Gem::TestCase
@a1_pre, @a1_pre_gem = util_gem 'a', '1.a'
@b1, @b1_gem = util_gem 'b', '1' do |s|
@b1, @b1_gem = util_gem 'b', '1' do |s|
s.add_dependency 'a'
s.add_development_dependency 'aa'
end

View File

@ -740,7 +740,7 @@ class TestGemResolver < Gem::TestCase
def test_select_local_platforms
r = Gem::Resolver.new nil, nil
a1 = util_spec 'a', 1
a1 = util_spec 'a', 1
a1_p1 = util_spec 'a', 1 do |s|
s.platform = Gem::Platform.local
@ -756,7 +756,7 @@ class TestGemResolver < Gem::TestCase
end
def test_search_for_local_platform_partial_string_match
a1 = util_spec 'a', 1
a1 = util_spec 'a', 1
a1_p1 = util_spec 'a', 1 do |s|
s.platform = Gem::Platform.local.os