mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
use map! instead of reassigning
This commit is contained in:
parent
583fc5dd60
commit
3883a381b6
@ -92,7 +92,7 @@ class ClusterNode
|
|||||||
# As we want to aggregate adiacent slots we convert all the
|
# As we want to aggregate adiacent slots we convert all the
|
||||||
# slot integers into ranges (with just one element)
|
# slot integers into ranges (with just one element)
|
||||||
# So we have something like [1..1,2..2, ... and so forth.
|
# So we have something like [1..1,2..2, ... and so forth.
|
||||||
slots = slots.map{|x| x..x}
|
slots.map!{|x| x..x}
|
||||||
|
|
||||||
# Finally we group ranges with adiacent elements.
|
# Finally we group ranges with adiacent elements.
|
||||||
slots = slots.reduce([]) {|a,b|
|
slots = slots.reduce([]) {|a,b|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user