Skip to content

Parse::Object shouldn't extend Hash #127

Open
@ericcj

Description

@ericcj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions