gitlab-org--gitlab-foss/spec/support/redis_without_keys.rb
2017-10-17 12:47:20 +02:00

8 lines
249 B
Ruby

class Redis
ForbiddenCommand = Class.new(StandardError)
def keys(*args)
raise ForbiddenCommand.new("Don't use `Redis#keys` as it iterates over all "\
"keys in redis. Use `Redis#scan_each` instead.")
end
end