lib/fog/internet_archive/models/storage/ia_attributes.rb in fog-1.20.0 vs lib/fog/internet_archive/models/storage/ia_attributes.rb in fog-1.21.0

- old
+ new

@@ -16,10 +16,10 @@ module InstanceMethods # set_metadata_array_headers(:collections, options) def set_metadata_array_headers(array_attribute, options={}) attr_values = Array(self.send(array_attribute)) - opt_values = options.collect do |key,value| + opt_values = options.collect do |key,value| options.delete(key) if (key.to_s =~ /^x-(amz||archive)-meta(\d*)-#{array_attribute.to_s[0..-2]}/) end values = (attr_values + opt_values).compact.sort.uniq # got the values, now add them back to the options if values.size == 1