lib/keytar/key_builder.rb in keytar-1.4.0 vs lib/keytar/key_builder.rb in keytar-1.4.1

- old
+ new

@@ -38,24 +38,23 @@ # allow for loose naming of keys configuration symbols can use :key_prefix or just :prefix options.keys.each do |key| options["key_#{key}".to_sym] = options[key] if key.to_s !~ /^key_/ end - names.each do |name| # define (cache) class method (class << self;self ;end).instance_eval do define_method("#{name}_key") do |*args| - options.merge!(:name => name, :base => self.to_s.downcase, :args => args) - build_key(options) + build_options = options.merge(:name => name, :base => self.to_s.downcase, :args => args) + build_key(build_options) end end # define (cache) instance method class_eval do define_method("#{name}_key") do |*args| - options.merge!(:name => name, :args => args) - build_key(options) + build_options = options.merge(:name => name, :args => args) + build_key(build_options) end end end end alias :cache_keys :cache_key \ No newline at end of file