Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible for Buildr::Ivy::IvyConfig#enabled? to ever return false #5

Closed
rsutphin opened this issue May 26, 2010 · 1 comment

Comments

@rsutphin
Copy link

Buildr::Ivy::IvyConfig#enabled? is implemented such that it will always return true. This is a side effect of using || for a default value:

nil || true   # => true
false || true # => also true

When the defaultable value is boolean, you need to explictly check whether the setting is nil before using the default value:

@enabled ||= Ivy.setting('enabled').nil? ? true : Ivy.setting('enabled')
@klaas1979
Copy link
Owner

will be in next release

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants