1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Make forgotten_command_line_options always "forget" options

https://github.com/rubygems/rubygems/commit/4d39338670
This commit is contained in:
David Rodríguez 2020-05-28 18:04:41 +02:00 committed by Hiroshi SHIBATA
parent 99dc55987d
commit 5c924f597f
Notes: git 2020-06-05 07:33:57 +09:00

View file

@ -131,12 +131,10 @@ module Spec
bang :bundle
def forgotten_command_line_options(options)
remembered = Bundler::VERSION.split(".", 2).first == "2"
options = options.map do |k, v|
v = '""' if v && v.to_s.empty?
[k, v]
end
return Hash[options] if remembered
options.each do |k, v|
if v.nil?
bundle! "config unset #{k}"