ruby-changes:57552
From: David <ko1@a...>
Date: Thu, 5 Sep 2019 19:40:06 +0900 (JST)
Subject: [ruby-changes:57552] d9e6315177 (master): [rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offenses
https://git.ruby-lang.org/ruby.git/commit/?id=d9e6315177 From d9e6315177be2a1264213a1e7cb215312a23384a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Thu, 22 Aug 2019 17:36:29 +0200 Subject: [rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offenses https://github.com/rubygems/rubygems/commit/d4fc383497 diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index 86abc4d..347f8c3 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -206,8 +206,8 @@ class Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/basic_specification.rb#L206 def internal_init # :nodoc: @extension_dir = nil - @full_gem_path = nil - @gem_dir = nil + @full_gem_path = nil + @gem_dir = nil @ignored = nil end diff --git a/lib/rubygems/dependency.rb b/lib/rubygems/dependency.rb index 3c91392..a033603 100644 --- a/lib/rubygems/dependency.rb +++ b/lib/rubygems/dependency.rb @@ -140,7 +140,7 @@ class Gem::Dependency https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency.rb#L140 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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency.rb#L266 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 diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb index a5738ca..6d45688 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb @@ -88,14 +88,14 @@ class Gem::DependencyInstaller https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency_installer.rb#L88 @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 = [] diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb index 3fd0a87..d91ecd2 100644 --- a/lib/rubygems/ext/builder.rb +++ b/lib/rubygems/ext/builder.rb @@ -108,7 +108,7 @@ class Gem::Ext::Builder https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/builder.rb#L108 @build_args = build_args @gem_dir = spec.full_gem_path - @ran_rake = false + @ran_rake = false end ## diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 9481bd2..a40deef 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -698,7 +698,7 @@ class Gem::Installer https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L698 @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' diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 5aceb8d..c023e4f 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -190,8 +190,8 @@ class Gem::Specification < Gem::BasicSpecification https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L190 # 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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L1230 @@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? diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb index 86a2350..619f327 100644 --- a/lib/rubygems/version.rb +++ b/lib/rubygems/version.rb @@ -392,7 +392,7 @@ class Gem::Version https://github.com/ruby/ruby/blob/trunk/lib/rubygems/version.rb#L392 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 diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb index fb7629c..a233377 100644 --- a/test/rubygems/test_gem_commands_install_command.rb +++ b/test/rubygems/test_gem_commands_install_command.rb @@ -670,7 +670,7 @@ ERROR: Possible alternatives: non_existent_with_hint https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_install_command.rb#L670 @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") diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index ad29b1b..02171ec 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -222,7 +222,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_setup_command.rb#L222 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' diff --git a/test/rubygems/test_gem_commands_signin_command.rb b/test/rubygems/test_gem_commands_signin_command.rb index 6276ea0..c000c7a 100644 --- a/test/rubygems/test_gem_commands_signin_command.rb +++ b/test/rubygems/test_gem_commands_signin_command.rb @@ -87,7 +87,7 @@ class TestGemCommandsSigninCommand < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_signin_command.rb#L87 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 diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb index 15fc8c7..22f3a91 100644 --- a/test/rubygems/test_gem_dependency_installer.rb +++ b/test/rubygems/test_gem_dependency_installer.rb @@ -32,7 +32,7 @@ class TestGemDependencyInstaller < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_dependency_installer.rb#L32 @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 diff --git a/test/rubygems/test_gem_resolver.rb b/test/rubygems/test_gem_resolver.rb index 172b46a..c35a264 100644 --- a/test/rubygems/test_gem_resolver.rb +++ b/test/rubygems/test_gem_resolver.rb @@ -740,7 +740,7 @@ class TestGemResolver < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_resolver.rb#L740 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 https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_resolver.rb#L756 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/