lib/lockbox/utils.rb in lockbox-1.1.2 vs lib/lockbox/utils.rb in lockbox-1.2.0

- old
+ new

@@ -24,9 +24,13 @@ master_key: options.delete(:master_key), encode: false ) end + unless options.key?(:previous_versions) + options[:previous_versions] = Lockbox.default_options[:previous_versions] + end + if options[:previous_versions].is_a?(Array) # dup previous versions array (with map) since elements are updated # dup each version (with dup) since keys are sometimes deleted options[:previous_versions] = options[:previous_versions].map(&:dup) options[:previous_versions].each_with_index do |version, i|