Skip to content

Commit

Permalink
[rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundExc…
Browse files Browse the repository at this point in the history
…eptionHandlingKeywords

rubygems/rubygems@ad1fe68d97
  • Loading branch information
hsbt committed Mar 17, 2023
1 parent 583fbc6 commit 9ffd735
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion lib/rubygems/commands/cert_command.rb
Expand Up @@ -262,7 +262,6 @@ def load_default_key
key = File.read key_file
passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
options[:key] = OpenSSL::PKey.read key, passphrase

rescue Errno::ENOENT
alert_error \
"--private-key not specified and ~/.gem/gem-private_key.pem does not exist"
Expand Down
1 change: 0 additions & 1 deletion lib/rubygems/dependency_installer.rb
Expand Up @@ -178,7 +178,6 @@ def find_gems_with_sources(dep, best_only=false) # :nodoc:
end

set << specs

rescue Gem::RemoteFetcher::FetchError => e
# FIX if there is a problem talking to the network, we either need to always tell
# the user (no really_verbose) or fail hard, not silently tell them that we just
Expand Down
1 change: 0 additions & 1 deletion lib/rubygems/request.rb
Expand Up @@ -223,7 +223,6 @@ def perform_request(request) # :nodoc:
end

verbose "#{response.code} #{response.message}"

rescue Net::HTTPBadResponse
verbose "bad response"

Expand Down
3 changes: 0 additions & 3 deletions lib/rubygems/request_set/gem_dependency_api.rb
Expand Up @@ -592,7 +592,6 @@ def git(repository)
@current_repository = repository

yield

ensure
@current_repository = nil
end
Expand Down Expand Up @@ -684,7 +683,6 @@ def group(*groups)
@current_groups = groups

yield

ensure
@current_groups = nil
end
Expand Down Expand Up @@ -759,7 +757,6 @@ def platform(*platforms)
@current_platforms = platforms

yield

ensure
@current_platforms = nil
end
Expand Down
1 change: 0 additions & 1 deletion test/rubygems/test_gem_command.rb
Expand Up @@ -68,7 +68,6 @@ def test_self_extra_args

Gem::Command.extra_args = "--awesome=true --verbose"
assert_equal %w[--awesome=true --verbose], Gem::Command.extra_args

ensure
Gem::Command.extra_args = extra_args
$; = separator
Expand Down
2 changes: 0 additions & 2 deletions test/rubygems/test_gem_commands_environment_command.rb
Expand Up @@ -48,7 +48,6 @@ def test_execute
assert_match %r{- /bin$}, @ui.output

assert_empty @ui.error

ensure
Gem.sources.replace orig_sources
ENV["PATH"] = orig_path
Expand Down Expand Up @@ -125,7 +124,6 @@ def test_execute_remotesources

assert_equal "http://gems.example.com\n", @ui.output
assert_equal "", @ui.error

ensure
Gem.sources.replace orig_sources
end
Expand Down
1 change: 0 additions & 1 deletion test/rubygems/test_gem_ext_ext_conf_builder.rb
Expand Up @@ -218,7 +218,6 @@ def configure_args(args = nil)
RbConfig::CONFIG["configure_args"] = args if args

yield

ensure
if configure_args
RbConfig::CONFIG["configure_args"] = configure_args
Expand Down
1 change: 0 additions & 1 deletion test/rubygems/test_gem_installer.rb
Expand Up @@ -361,7 +361,6 @@ def test_generate_bin_bindir_with_user_install_warning
end

assert_equal "", @ui.error

ensure
ENV["PATH"] = old_path
end
Expand Down
1 change: 0 additions & 1 deletion test/rubygems/test_gem_request_connection_pools.rb
Expand Up @@ -127,7 +127,6 @@ def test_net_http_args_no_proxy
net_http_args = pools.send :net_http_args, URI("http://example"), @proxy

assert_equal ["example", 80, nil, nil], net_http_args

ensure
ENV["no_proxy"] = orig_no_proxy
end
Expand Down
1 change: 0 additions & 1 deletion test/rubygems/test_gem_request_set_gem_dependency_api.rb
Expand Up @@ -362,7 +362,6 @@ def test_gem_platforms_multiple

assert_empty @set.dependencies
end

ensure
Gem.win_platform = win_platform
end
Expand Down
1 change: 0 additions & 1 deletion test/rubygems/test_gem_specification.rb
Expand Up @@ -810,7 +810,6 @@ def test_self_load_tainted
@a2.files.clear

assert_equal @a2, spec

ensure
$SAFE = 0
end
Expand Down

0 comments on commit 9ffd735

Please sign in to comment.