[前][次][番号順一覧][スレッド一覧]

ruby-changes:61509

From: David <ko1@a...>
Date: Fri, 5 Jun 2020 07:33:37 +0900 (JST)
Subject: [ruby-changes:61509] b2a460ea3e (master): [rubygems/rubygems] Centralize `with` and `without` setting

https://git.ruby-lang.org/ruby.git/commit/?id=b2a460ea3e

From b2a460ea3e4abf0322c0a5475ce2d89fde46b4c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Thu, 28 May 2020 23:06:34 +0200
Subject: [rubygems/rubygems] Centralize `with` and `without` setting

https://github.com/rubygems/rubygems/commit/5e854722e2

diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 068046f..893ed59 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -150,20 +150,16 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/install.rb#L150
 
       check_for_group_conflicts_in_cli_options
 
-      Bundler.settings.set_command_option :with, nil if options[:with] == []
-      Bundler.settings.set_command_option :without, nil if options[:without] == []
-
       with = options.fetch(:with, [])
       with |= Bundler.settings[:with].map(&:to_s)
       with -= options[:without] if options[:without]
+      with = nil if options[:with] == []
 
       without = options.fetch(:without, [])
       without |= Bundler.settings[:without].map(&:to_s)
       without -= options[:with] if options[:with]
+      without = nil if options[:without] == []
 
-      # need to nil them out first to get around validation for backwards compatibility
-      Bundler.settings.set_command_option :without, nil
-      Bundler.settings.set_command_option :with,    nil
       Bundler.settings.set_command_option :without, without
       Bundler.settings.set_command_option :with,    with
     end
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]