diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2018-09-27 22:17:25 -0300 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-01-07 13:32:45 +0100 |
commit | 09e061e5eac32fa0a06ae578499ae16b4cd341a3 (patch) | |
tree | 6b4eaeb9b768a50a9f27772b50bfdc71ef6b5809 | |
parent | a63a39d738865665f714f179fe42dd10006da26d (diff) | |
download | bundler-remove_unnecessary_condition.tar.gz |
Remove unnecessary conditionremove_unnecessary_condition
This is currently dead code because all feature flags specify a default
block. With the current implementation, if we ever defined a feature
flag without specifying a default block, it would instead return the
default setting value. I think it is better to raise an error in that
case, since it would probably be an overlook and not something
intentional.
-rw-r--r-- | lib/bundler/feature_flag.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb index 249170c4b2..0adbd9190f 100644 --- a/lib/bundler/feature_flag.rb +++ b/lib/bundler/feature_flag.rb @@ -19,7 +19,7 @@ module Bundler def self.settings_method(name, key, &default) define_method(name) do value = Bundler.settings[key] - value = instance_eval(&default) if value.nil? && !default.nil? + value = instance_eval(&default) if value.nil? value end end |