lib/stripe/util.rb in stripe-1.40.0 vs lib/stripe/util.rb in stripe-1.41.0
- old
+ new
@@ -118,10 +118,10 @@
def self.flatten_params(params, parent_key=nil)
result = []
# do not sort the final output because arrays (and arrays of hashes
# especially) can be order sensitive, but do sort incoming parameters
- params.sort_by { |(k, v)| k.to_s }.each do |key, value|
+ params.sort_by { |(k, _)| k.to_s }.each do |key, value|
calculated_key = parent_key ? "#{parent_key}[#{key}]" : "#{key}"
if value.is_a?(Hash)
result += flatten_params(value, calculated_key)
elsif value.is_a?(Array)
result += flatten_params_array(value, calculated_key)