mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-09-22 00:00:31 -04:00
Check for @values in StripeObject#method_not_found
If a StripeObject is being deserialized by psych, @values.has_key? is called before @values is initialized which prevents proper deserialization from occurring. Checking for existence first resolves the issue.
This commit is contained in:
parent
637d5899f6
commit
974f5ce425
@ -181,7 +181,7 @@ module Stripe
|
||||
end
|
||||
|
||||
def respond_to_missing?(symbol, include_private = false)
|
||||
@values.has_key?(symbol) || super
|
||||
@values && @values.has_key?(symbol) || super
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user