Permalink
Browse files

zookeeper: fomula always ignore --c option

'or' and '=' pair cause unexpected result in 'or' chain.

Behavior check code:
```ruby
a = nil
b = nil
c = 0
p a or b or c     #=> nil - old code
p (a or b) or c   #=> nil
p ((a or b) or c) #=> 0   - fixed code
```
  • Loading branch information...
1 parent e729dcb commit a19e3603448865552af77fe88e4919bf2850b4c9 @repeatedly committed Oct 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Library/Formula/zookeeper.rb
@@ -61,7 +61,7 @@ def install
build_python = build.include? "python"
build_perl = build.include? "perl"
- build_c = build_python or build_perl or build.include? "c"
+ build_c = ((build_python or build_perl) or build.include? "c")
# Build & install C libraries.
cd "src/c" do

1 comment on commit a19e360

adamv commented on a19e360 Oct 3, 2012

Should we be using || too?

Please sign in to comment.