Skip to content

Commit 20fd080

Browse files
Merge #647
647: Add optional message argument to ping r=badboy According to Redis, you can pass an optional argument to PING. To be consistent with their API, I've added that optional argument
2 parents a3c80fc + c4884f3 commit 20fd080

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/redis.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,11 @@ def select(db)
143143

144144
# Ping the server.
145145
#
146+
# @param [optional, String] message
146147
# @return [String] `PONG`
147-
def ping
148+
def ping(message = nil)
148149
synchronize do |client|
149-
client.call([:ping])
150+
client.call([:ping, message].compact)
150151
end
151152
end
152153

0 commit comments

Comments
 (0)