lib/redis/objects/locks.rb in redis-objects-0.1.0 vs lib/redis/objects/locks.rb in redis-objects-0.1.1

- old
+ new

@@ -20,10 +20,10 @@ def lock(name, options={}) options[:timeout] ||= 5 # seconds @locks[name] = options class_eval <<-EndMethods def #{name}_lock(&block) - @#{name}_lock ||= Redis::Lock.new(field_key(:#{name}_lock), self.class.locks[:#{name}].merge(:redis => redis)) + @#{name}_lock ||= Redis::Lock.new(field_key(:#{name}_lock), redis, self.class.locks[:#{name}]) end EndMethods end # Obtain a lock, and execute the block synchronously. Any other code