-
Notifications
You must be signed in to change notification settings - Fork 43
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
Undefined method `=~' for [:ReturnEnvelope, :Boolean]:Array #215
Comments
Hey, I hit this issue too: #216, see their reply there. |
I'm hitting this same issue with gem version 6.0.9 after upgrading to Ruby 3.2.0. Is Lob doing anything about this? Am I expected to patch the code myself and rebuild the gem? |
That's a shame, I was hoping the newer versions fixed it.
|
@arich Thanks. I ended up forking it as well and patching it with your code suggestion. That fixed the issue. I will hold out hope that Lob figures this out so I can use the official gem. |
Sounds good, I'm not promising I'll maintain this forever so best to use your own fork! |
I'm receiving the error in the title when sending a Letter. It seems that the problem is with attributes that are mapped to Open API type that is an Ruby Array.
In this error in particular
return_envelope
is mapped toArray[:ReturnEnvelope, :Boolean]
:lob-ruby/lib/openapi_client/models/letter.rb
Line 190 in 2591d23
The second if in
Letter#build_from_hash
breaks because a=~
is sent to the array instance:lob-ruby/lib/openapi_client/models/letter.rb
Line 624 in 2591d23
Maybe the third if should precede the second one and add a check if
type
responds_to(:=~)? This problem should be present in all the implementations ofbuild_form_hash
of other model classes.Thanks!
The text was updated successfully, but these errors were encountered: