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

Make ActiveSupport HashWithIndifferentAccess#to_options and alias for HashWithIndifferentAccess#symbolize_keys #34360

Merged
merged 1 commit into from Nov 1, 2018
Merged

Make ActiveSupport HashWithIndifferentAccess#to_options and alias for HashWithIndifferentAccess#symbolize_keys #34360

merged 1 commit into from Nov 1, 2018

Conversation

@weilandia
Copy link
Contributor

@weilandia weilandia commented Nov 1, 2018

Fixes #34359

Summary

Prior to 5.2.0 (de9e323, 2cad8d7), HashWithIndifferentAccess#to_options acted as
an alias to HashWithIndifferentAccess#symbolize_keys. Now, #to_options
returns an instance of HashWithIndifferentAccess while #symbolize_keys
returns and instance of Hash.

This pr makes it so HashWithIndifferentAccess#to_options acts as an
alias for HashWithIndifferentAccess#symbolize_keys once again.

Other Information

See #34359

Thanks!

@rails-bot
Copy link

@rails-bot rails-bot commented Nov 1, 2018

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @kamipo (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review.

Please see the contribution instructions for more information.

Copy link
Member

@gmcgibbon gmcgibbon left a comment

I think this counts as a bug. Could you please add a changelog entry?

Fixes #34359

Prior to 5.2.0 (2cad8d7), HashWithIndifferentAccess#to_options acted as
an alias to HashWithIndifferentAccess#symbolize_keys. Now, #to_options
returns an instance of HashWithIndifferentAccess while #symbolize_keys
returns and instance of Hash.

This pr makes it so HashWithIndifferentAccess#to_options acts as an
alias for HashWithIndifferentAccess#symbolize_keys once again.
@weilandia
Copy link
Contributor Author

@weilandia weilandia commented Nov 1, 2018

@gmcgibbon thanks for the review! I addressed your comments -- let me know if anything else stands out.

Also, do you think this issue warrants a note in the release notes/upgrade guide for 5.2?

@rafaelfranca rafaelfranca merged commit d80925b into rails:master Nov 1, 2018
2 checks passed
rafaelfranca added a commit that referenced this issue Nov 1, 2018
…access_to_options

Make ActiveSupport HashWithIndifferentAccess#to_options and alias for HashWithIndifferentAccess#symbolize_keys
@weilandia weilandia deleted the 34359_hash_with_indifferent_access_to_options branch Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants