зеркало из https://github.com/github/github-ds.git
Use the argument - not a static value
This commit is contained in:
Родитель
28d00e8fed
Коммит
54dd97fef5
|
@ -263,7 +263,7 @@ module GitHub
|
||||||
#
|
#
|
||||||
# Returns the key's value after incrementing.
|
# Returns the key's value after incrementing.
|
||||||
def increment(key, amount: 1, expires: nil)
|
def increment(key, amount: 1, expires: nil)
|
||||||
raise ArgumentError.new("The amount specified must be an integer") unless 1.is_a? Integer
|
raise ArgumentError.new("The amount specified must be an integer") unless amount.is_a? Integer
|
||||||
raise ArgumentError.new("The amount specified my be > 0") if amount < 1
|
raise ArgumentError.new("The amount specified my be > 0") if amount < 1
|
||||||
|
|
||||||
# This query uses a few MySQL "hacks" to ensure that the incrementing
|
# This query uses a few MySQL "hacks" to ensure that the incrementing
|
||||||
|
|
Загрузка…
Ссылка в новой задаче