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

Soft-deprecate the `HashWithIndifferentAccess` constant #28157

merged 2 commits into from Feb 25, 2017


Copy link

robin850 commented Feb 24, 2017


That's just a second take on #27925. This version just softly deprecates the top-level HashWithIndifferentAccess constant rather than trying to display a deprecation message since this constant and the ActiveSupport-scoped one are exactly the same which means that changing one inevitably changes the other.

PS : Even though it's not yet posted, I took the liberty to add the link to the 5.1 release notes in the upgrade guides to avoid missing it writing the other steps of the upgrade process.

Have a nice day ! :-)

@robin850 robin850 force-pushed the robin850:hwia-soft-deprecation branch Feb 24, 2017
Since using a `ActiveSupport::Deprecation::DeprecatedConstantProxy`
would prevent people from inheriting this class and extending it
from the `ActiveSupport::HashWithIndifferentAccess` one would break
the ancestors chain, that's the best option we have here.
@robin850 robin850 force-pushed the robin850:hwia-soft-deprecation branch Feb 24, 2017
This ensures that if we try to hard-deprecate it again in the future,
we won't break these behaviors.
@robin850 robin850 force-pushed the robin850:hwia-soft-deprecation branch to ac57a3e Feb 24, 2017
@matthewd matthewd merged commit ac57a3e into rails:master Feb 25, 2017
2 checks passed
2 checks passed
codeclimate no new or fixed issues
continuous-integration/travis-ci/pr The Travis CI build passed
matthewd added a commit that referenced this pull request Feb 25, 2017
Soft-deprecate the `HashWithIndifferentAccess` constant
@robin850 robin850 deleted the robin850:hwia-soft-deprecation branch Feb 25, 2017
@@ -1,3 +1,9 @@
* Soft-deprecated the top-level `HashWithIndifferentAcces` constant.

This comment has been minimized.

Copy link

et Feb 25, 2017

typo on HashWithIndifferentAcces

This comment has been minimized.

Copy link

kamipo Feb 25, 2017


Fixed in dd3adc5.

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

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.