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

Change unless + else into if + else #6181

Closed
wants to merge 1 commit into from
Closed

Conversation

shaliko
Copy link
Contributor

@shaliko 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

Choose a reason for hiding this comment

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

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants