Change unless + else into if + else #6181

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

shaliko commented May 6, 2012

- unless include_seconds_or_options.is_a?(Hash)
+ if !include_seconds_or_options.is_a?(Hash)
+ options = include_seconds_or_options
+ else
@carlosantoniodasilva

carlosantoniodasilva May 6, 2012

Owner

Sorry but this condition is wrong, the change inverts the logic. It should be something like:

if include_seconds_or_options.is_a?(Hash)
  options = include_seconds_or_options
else
  # ... warn and set option
end

Please make sure you run the tests to make sure everything is ok. Thanks!

@shaliko

shaliko May 6, 2012

Contributor

Yes, I was wrong. Closed the pull request. I wil fix it and make a new pull request.

@shaliko shaliko closed this May 6, 2012

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