Skip to content

Commit b68dbc7

Browse files
committed
fix rubocop errors
1 parent ed59464 commit b68dbc7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/redis_client/cluster/command.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
class RedisClient
88
class Cluster
99
class Command
10-
EMPTY_STRING = "".freeze
11-
LEFT_BRACKET = "{".freeze
12-
RIGHT_BRACKET = "}".freeze
10+
EMPTY_STRING = ''
11+
LEFT_BRACKET = '{'
12+
RIGHT_BRACKET = '}'
1313

1414
Detail = Struct.new(
1515
'RedisCommand',
@@ -106,10 +106,9 @@ def determine_optional_key_position(command, option_name) # rubocop:disable Metr
106106
# @see https://redis.io/topics/cluster-spec#keys-hash-tags Keys hash tags
107107
def extract_hash_tag(key)
108108
key = key.to_s
109-
110109
s = key.index(LEFT_BRACKET)
111110
return EMPTY_STRING if s.nil?
112-
111+
113112
e = key.index(RIGHT_BRACKET, s + 1)
114113
return EMPTY_STRING if e.nil?
115114

0 commit comments

Comments
 (0)