Skip to content

Commit c44fdde

Browse files
committed
Use Hash#reject insted of Hash#compact for legacy Ruby
1 parent 584a8c6 commit c44fdde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/redis/cluster/option.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def parse_node_url(addr)
6262
raise InvalidClientOptionError, "Invalid uri scheme #{addr}" unless VALID_SCHEMES.include?(uri.scheme)
6363

6464
db = uri.path.split('/')[1]&.to_i
65-
{ scheme: uri.scheme, password: uri.password, host: uri.host, port: uri.port, db: db }.compact
65+
{ scheme: uri.scheme, password: uri.password, host: uri.host, port: uri.port, db: db }.reject { |_, v| v.nil? }
6666
rescue URI::InvalidURIError => err
6767
raise InvalidClientOptionError, err.message
6868
end

0 commit comments

Comments
 (0)