This repository has been archived by the owner. It is now read-only.

zookeeper: fomula always ignore --c option #15267

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@repeatedly

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

Behavior check code:

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
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
```
@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 3, 2012

Should we be using || too?

adamv commented on a19e360 Oct 3, 2012

Should we be using || too?

@repeatedly

This comment has been minimized.

Show comment Hide comment
@repeatedly

repeatedly Oct 3, 2012

Yes, '||' works too.
I followed original 'or' code.

Yes, '||' works too.
I followed original 'or' code.

@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 3, 2012

Contributor

I'm not a ruby expert; is or or || recommended in general?

Contributor

adamv commented Oct 3, 2012

I'm not a ruby expert; is or or || recommended in general?

@repeatedly

This comment has been minimized.

Show comment Hide comment
@repeatedly

repeatedly Oct 3, 2012

I don't know...
It depends on coding guidelines.

Personally, "or" is mainly used in some projects.

I don't know...
It depends on coding guidelines.

Personally, "or" is mainly used in some projects.

@adamv adamv closed this in 2183707 Oct 3, 2012

@repeatedly

This comment has been minimized.

Show comment Hide comment
@repeatedly

repeatedly Oct 4, 2012

Thanks!

Thanks!

@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 4, 2012

Contributor

Thanks for the report

Contributor

adamv commented Oct 4, 2012

Thanks for the report

snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this pull request Dec 17, 2012

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.