summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-03-16 14:10:30 +0900
committerHiroshi SHIBATA <[email protected]>2023-03-17 18:50:55 +0900
commit72d09a568f9f50ce7c41ef2999d272f77a207a8c (patch)
treeaeb539d5e35ea0ad2ee7880f30d5095afdd7bf34 /lib/rubygems/commands
parenta532e9dc37bb7ff2fb36966327f71a74163d9616 (diff)
[rubygems/rubygems] util/rubocop -A --only Style/RedundantBegin
https://github.com/rubygems/rubygems/commit/b595d3cf0f
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r--lib/rubygems/commands/owner_command.rb12
-rw-r--r--lib/rubygems/commands/unpack_command.rb10
2 files changed, 9 insertions, 13 deletions
diff --git a/lib/rubygems/commands/owner_command.rb b/lib/rubygems/commands/owner_command.rb
index 4751928682..cd60157911 100644
--- a/lib/rubygems/commands/owner_command.rb
+++ b/lib/rubygems/commands/owner_command.rb
@@ -93,14 +93,12 @@ permission to.
def manage_owners(method, name, owners)
owners.each do |owner|
- begin
- response = send_owner_request(method, name, owner)
- action = method == :delete ? "Removing" : "Adding"
+ response = send_owner_request(method, name, owner)
+ action = method == :delete ? "Removing" : "Adding"
- with_response response, "#{action} #{owner}"
- rescue StandardError
- # ignore
- end
+ with_response response, "#{action} #{owner}"
+ rescue StandardError
+ # ignore
end
end
diff --git a/lib/rubygems/commands/unpack_command.rb b/lib/rubygems/commands/unpack_command.rb
index e48e36823c..314571dee6 100644
--- a/lib/rubygems/commands/unpack_command.rb
+++ b/lib/rubygems/commands/unpack_command.rb
@@ -95,12 +95,10 @@ command help for an example.
FileUtils.mkdir_p @options[:target] if @options[:target]
- destination = begin
- if @options[:target]
- File.join @options[:target], spec_file
- else
- spec_file
- end
+ destination = if @options[:target]
+ File.join @options[:target], spec_file
+ else
+ spec_file
end
File.open destination, "w" do |io|