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

Changed some conditions and loops to positive statements #56

Merged
merged 2 commits into from May 6, 2011

Conversation

bltavares
Copy link
Contributor

Really liked the gem and wanted to help as I can

@@ -25,7 +25,7 @@ module Guard

def self.usable?
require 'rb-fsevent'
if !defined?(FSEvent::VERSION) || Gem::Version.new(FSEvent::VERSION) < Gem::Version.new('0.3.9')
unless defined?(FSEvent::VERSION) || Gem::Version.new(FSEvent::VERSION) >= Gem::Version.new('0.3.9')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think (!a || b) == !(a && !b) but you wrote !(a || !b). Anyway, we try to always avoid multiple conditions with "unless".

@rymai
Copy link
Member

rymai commented May 5, 2011

Thanks for your interest in Guard, I think we will not merge the "unless" with multiple conditions since it's less clear than before (moreover, the conditions appears to be wrong to me now), but we could definitely merge the "until"! ;)

Bed time now here!

@bltavares
Copy link
Contributor Author

I just reverted the unless with multiple conditions. It got a little weird, I admit.

I'll see what else I can help (:

Bed time here also.

@bltavares bltavares closed this May 5, 2011
@bltavares bltavares reopened this May 5, 2011
rymai pushed a commit that referenced this pull request May 6, 2011
Changed some loops to positive statements
@rymai rymai merged commit 815a81d into guard:master May 6, 2011
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

Successfully merging this pull request may close these issues.

None yet

2 participants