Skip to content

Commit 4977fcd

Browse files
authored
Add optional message argument to ping
1 parent 00c2233 commit 4977fcd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/redis.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ 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)
149+
arguments = [:ping, message].compact
148150
synchronize do |client|
149-
client.call([:ping])
151+
client.call(arguments)
150152
end
151153
end
152154

0 commit comments

Comments
 (0)