Skip to content

JSON gem compatibility doesn't object_class #227

@technicalpickles

Description

@technicalpickles

I wanted to test this in our app, but I saw some sorbet errors:

TypeError:
  T.let: Expected type OpenStruct, got type Hash with value {"..."=>"..."}
  Caller: some_ruby.rb:71

The code in question:

    PRICE = T.let(
      JSON.parse("....", object_class: OpenStruct)
    )

This tells me that object_class isn't supported in yajl-ruby. I am pretty sure I can remove the usage of these because they are weird, but I figure I would still submit in case anyone else runs into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions