]> git.saurik.com Git - redis.git/commitdiff
use map! instead of reassigning
authorantirez <antirez@gmail.com>
Wed, 13 Apr 2011 16:46:29 +0000 (18:46 +0200)
committerantirez <antirez@gmail.com>
Wed, 13 Apr 2011 16:46:29 +0000 (18:46 +0200)
src/redis-trib.rb

index 3ebcf6b68c4a176ce3aa56dfb69e844ed74da87e..5ae0370a834c1f12a2afd1b451e3edb17031ffb4 100755 (executable)
@@ -92,7 +92,7 @@ class ClusterNode
         # As we want to aggregate adiacent slots we convert all the
         # slot integers into ranges (with just one element)
         # 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.
         slots = slots.reduce([]) {|a,b|