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

Fix deprecate_constant INTERPOLATION_PATTERN #531

Merged
merged 1 commit into from Jun 24, 2020
Merged

Fix deprecate_constant INTERPOLATION_PATTERN #531

merged 1 commit into from Jun 24, 2020

Conversation

biinari
Copy link
Contributor

@biinari biinari commented Jun 12, 2020

deprecate_constant I18n::INTERPOLATION_PATTERN if Module responds to :deprecate_constant

Change introduced in #439 looks like it deprecates this constant, but the original condition will always evaluate as false.

deprecate_constant if Module responds to :deprecate_constant
Copy link
Collaborator

@radar radar left a comment

Choose a reason for hiding this comment

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

I think we could call deprecate_constant without worrying about whether or not it's supported, right? Because Ruby 2.3 and above has deprecate_constant. I'll merge this and double check.

Thank you for submitting this fix!

@radar radar merged commit 4e1a134 into ruby-i18n:master Jun 24, 2020
@biinari
Copy link
Contributor Author

biinari commented Jun 24, 2020

That's a good point @radar, it does seem to be present from Ruby 2.3 onward. I just happened across this on a wide grep across the gems we're using as it stuck out as being different to other uses of deprecate_constant. Feel free to remove the check entirely as Ruby >= 2.3 is required anyway.

@radar
Copy link
Collaborator

radar commented Jun 24, 2020 via email

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