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 stringify hash keys in Base#initialize #12

Merged
merged 3 commits into from
Sep 19, 2018
Merged

Conversation

notEthan
Copy link
Owner

while it may arguably be better for a JSI to treat hash keys that are symbols as if they were strings, calling deep_stringify_symbol_keys in Base#initialize is, for one thing, very much a half-assed solution since some_jsi[:foo] is not the same as some_jsi['foo'], and also problematic in that the JSI's instance then may or may not refer to the same actual object as the instance that was passed to #initialize.

in the future I might decide that Base#initialize does a deep stringifying copy of its instance if I fully implement something more like ActiveSupport::HashWithIndifferentAccess within JSI::Base. but I kind of doubt it.

@notEthan notEthan merged commit b1fcafe into master Sep 19, 2018
notEthan added a commit that referenced this pull request Sep 19, 2018
@notEthan notEthan deleted the no_stringify_base branch September 19, 2018 05:23
@notEthan notEthan restored the no_stringify_base branch September 27, 2018 08:58
@notEthan notEthan deleted the no_stringify_base branch September 27, 2018 08:58
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

1 participant