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

Don't try to duplicate nil options #295

Merged
merged 1 commit into from
Jan 10, 2015

Conversation

davidcornu
Copy link
Contributor

In the case when options is omitted, calling .dup on it results in TypeError: can't dup NilClass.

@arthurnn
Copy link
Contributor

need to add a regression test for it.

Also, I would do something like this, instead of changing the default value of the argument, just so we dont create extra objects.

options && options.dup || {}

@davidcornu
Copy link
Contributor Author

@arthurnn updated.

carlosantoniodasilva added a commit that referenced this pull request Jan 10, 2015
Don't try to duplicate nil options
@carlosantoniodasilva carlosantoniodasilva merged commit f2c9c66 into ruby-i18n:master Jan 10, 2015
@carlosantoniodasilva
Copy link
Member

Thanks.

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.

3 participants