mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Remove unnecessary code
`@host` _could_ be `nil` at this point, but only if all the conditions above for setting `@host` were `nil`. In that case, it is guaranteed to `default_gem_server` metadata is `nil` since it's one of the branches in that condition. So this code would just be setting an already `nil` variable to `nil`. Hence, not needed. https://github.com/rubygems/rubygems/commit/e3ccff3c5c
This commit is contained in:
parent
12ac0fa939
commit
856f2f31ff
Notes:
git
2020-05-08 14:14:25 +09:00
1 changed files with 0 additions and 4 deletions
|
@ -72,10 +72,6 @@ The push command will use ~/.gem/credentials to authenticate to a server, but yo
|
|||
|
||||
gem_data = Gem::Package.new(name)
|
||||
|
||||
unless @host
|
||||
@host = gem_data.spec.metadata['default_gem_server']
|
||||
end
|
||||
|
||||
push_host = nil
|
||||
|
||||
if gem_data.spec.metadata.has_key?('allowed_push_host')
|
||||
|
|
Loading…
Reference in a new issue