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

JSON gem compatibility doesn't object_class #227

Open
technicalpickles opened this issue Aug 11, 2023 · 0 comments
Open

JSON gem compatibility doesn't object_class #227

technicalpickles opened this issue Aug 11, 2023 · 0 comments

Comments

@technicalpickles
Copy link

technicalpickles commented Aug 11, 2023

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.

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

No branches or pull requests

1 participant