lib/stripe/util.rb in stripe-5.34.0 vs lib/stripe/util.rb in stripe-5.35.0
- old
+ new
@@ -206,10 +206,12 @@
case opts
when String
{ api_key: opts }
when Hash
check_api_key!(opts.fetch(:api_key)) if opts.key?(:api_key)
- opts.clone
+ # Explicitly use dup here instead of clone to avoid preserving freeze
+ # state on input params.
+ opts.dup
else
raise TypeError, "normalize_opts expects a string or a hash"
end
end