diff options
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r-- | lib/bundler/dsl.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 0436b58f3a..d531a38c04 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -332,7 +332,20 @@ module Bundler install_if = @install_conditionals.dup install_if.concat Array(opts.delete("install_if")) install_if = install_if.reduce(true) do |memo, val| - memo && (val.respond_to?(:call) ? val.call : val) + memo && case val + when TrueClass, FalseClass, NilClass + val + when Proc + val.call + when String + begin + eval(val) # rubocop:disable Lint/Eval + rescue + true + end + else + true + end end platforms = @platforms.dup |