Skip to content

Commit 584a8c6

Browse files
committed
Fix several codes for clean and readable code
1 parent 7a6dabc commit 584a8c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/redis/cluster.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def fetch_cluster_info!(option)
116116
[Node.new(option.per_node_key, node_flags, option.use_replica?),
117117
Slot.new(available_slots, node_flags, option.use_replica?)]
118118
ensure
119-
node&.map(&:disconnect)
119+
node&.each(&:disconnect)
120120
end
121121

122122
def fetch_command_details(nodes)

lib/redis/cluster/option.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def parse_node_option(addr)
8080
def add_common_node_option_if_needed(options, node_opts, key)
8181
return options if options[key].nil? && node_opts.first[key].nil?
8282

83-
options[key] = options[key] || node_opts.first[key]
83+
options[key] ||= node_opts.first[key]
8484
end
8585
end
8686
end

0 commit comments

Comments
 (0)