You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This deep stringifies input hashes in order to support symbol (and other
non-string) keys. Symbol keys have been a common issue for people
forever (as evidenced by `InvalidSymbolKey`) and I've been hesitant to
address it because duplicating hashes and stringifying keys hurts
performance, but I think it's probably worth it.
The tricky thing here is that `insert_property_defaults`,
`before_property_validation`, and `after_property_validation` need
access to the actual hashes instead of the stringified version. To work
around that, the original instance is passed around in `Context` and can
be accessed by location using `original_instance`. Values passed in
hooks need to be re-stringified in case the user added non-string keys.
If this becomes a performance bottleneck, it may make sense to add a way
to turn it off for people that know they're using string keys.
Related:
- #91
- #123
0 commit comments