summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-03-22 12:55:33 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-03-23 17:18:49 +0900
commit5efadf81393f3395837fede8f078ac97e485e4a5 (patch)
treea6756e790c142abc9a5cf09770497ef3a48a145e
parent8260698e74e6601e6183334471467f9d60dbd75e (diff)
[rubygems/rubygems] util/rubocop -A --only Lint/ShadowingOuterLocalVariable
https://github.com/rubygems/rubygems/commit/82ed77178d
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7582
-rw-r--r--lib/rubygems/commands/update_command.rb4
-rw-r--r--lib/rubygems/gemcutter_utilities.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 14a9cb76f8..facccc5c03 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -36,10 +36,10 @@ class Gem::Commands::UpdateCommand < Gem::Command
end
add_option("--system [VERSION]", Gem::Version,
- "Update the RubyGems system software") do |value, options|
+ "Update the RubyGems system software") do |value, opts|
value ||= true
- options[:system] = value
+ opts[:system] = value
end
add_local_remote_options
diff --git a/lib/rubygems/gemcutter_utilities.rb b/lib/rubygems/gemcutter_utilities.rb
index 10e535266d..58a51aad92 100644
--- a/lib/rubygems/gemcutter_utilities.rb
+++ b/lib/rubygems/gemcutter_utilities.rb
@@ -268,9 +268,9 @@ module Gem::GemcutterUtilities
scope_params = { scope => true }
else
say "Please select scopes you want to enable for the API key (y/n)"
- API_SCOPES.each do |scope|
- selected = ask_yes_no(scope.to_s, false)
- scope_params[scope] = true if selected
+ API_SCOPES.each do |s|
+ selected = ask_yes_no(s.to_s, false)
+ scope_params[s] = true if selected
end
say "\n"
end