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

Parse::Object shouldn't extend Hash #127

Open
ericcj opened this issue May 16, 2014 · 1 comment
Open

Parse::Object shouldn't extend Hash #127

ericcj opened this issue May 16, 2014 · 1 comment
Labels

Comments

@ericcj
Copy link
Contributor

ericcj commented May 16, 2014

it should duck-type/delegate [] and []= to a hash of estimated_data or something but it shouldn't actually return true for is_a?(Hash) since there's a bunch of Hash methods that don't make sense on it. there's too much dangerous code out there to extend hash and hope things work, e.g. https://github.com/rails/rails/blob/v4.1.1/activesupport/lib/active_support/json/encoding.rb#L85 causes json encoding a Parse::Object to not use its rest_api_hash that we intend and thereby be missing its className

@xavdid xavdid added the bug label Jun 1, 2015
@xavdid
Copy link
Collaborator

xavdid commented Jun 1, 2015

This is a fairly valid issue, but it's also a big code change. We'll keep it on the radar.

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

No branches or pull requests

2 participants