@@ -76,7 +76,7 @@ def persist(key)
76
76
# - `:lt => true`: Set expiry only when the new expiry is less than current one.
77
77
# @return [Boolean] whether the timeout was set or not
78
78
def expire ( key , seconds , nx : nil , xx : nil , gt : nil , lt : nil )
79
- args = [ :expire , key , seconds ]
79
+ args = [ :expire , key , Integer ( seconds ) ]
80
80
args << "NX" if nx
81
81
args << "XX" if xx
82
82
args << "GT" if gt
@@ -96,7 +96,7 @@ def expire(key, seconds, nx: nil, xx: nil, gt: nil, lt: nil)
96
96
# - `:lt => true`: Set expiry only when the new expiry is less than current one.
97
97
# @return [Boolean] whether the timeout was set or not
98
98
def expireat ( key , unix_time , nx : nil , xx : nil , gt : nil , lt : nil )
99
- args = [ :expireat , key , unix_time ]
99
+ args = [ :expireat , key , Integer ( unix_time ) ]
100
100
args << "NX" if nx
101
101
args << "XX" if xx
102
102
args << "GT" if gt
@@ -132,7 +132,7 @@ def ttl(key)
132
132
# - `:lt => true`: Set expiry only when the new expiry is less than current one.
133
133
# @return [Boolean] whether the timeout was set or not
134
134
def pexpire ( key , milliseconds , nx : nil , xx : nil , gt : nil , lt : nil )
135
- args = [ :pexpire , key , milliseconds ]
135
+ args = [ :pexpire , key , Integer ( milliseconds ) ]
136
136
args << "NX" if nx
137
137
args << "XX" if xx
138
138
args << "GT" if gt
@@ -152,7 +152,7 @@ def pexpire(key, milliseconds, nx: nil, xx: nil, gt: nil, lt: nil)
152
152
# - `:lt => true`: Set expiry only when the new expiry is less than current one.
153
153
# @return [Boolean] whether the timeout was set or not
154
154
def pexpireat ( key , ms_unix_time , nx : nil , xx : nil , gt : nil , lt : nil )
155
- args = [ :pexpireat , key , ms_unix_time ]
155
+ args = [ :pexpireat , key , Integer ( ms_unix_time ) ]
156
156
args << "NX" if nx
157
157
args << "XX" if xx
158
158
args << "GT" if gt
0 commit comments