diff options
author | Thomas McDonald <thomasm@palantir.com> | 2020-04-28 17:37:59 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-08 14:13:29 +0900 |
commit | 856f2f31ffebd070405821dd41fca9c67fd5cced (patch) | |
tree | 4394dcabec390941cbe16a082b3081328056e2b5 /lib | |
parent | 12ac0fa9396d08899cc3efdd7398f71b618ba9a0 (diff) |
[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
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3092
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/commands/push_command.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/rubygems/commands/push_command.rb b/lib/rubygems/commands/push_command.rb index bdb92cbb42..0c121cb553 100644 --- a/lib/rubygems/commands/push_command.rb +++ b/lib/rubygems/commands/push_command.rb @@ -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') |