[Groonga-commit] droonga/droonga-engine at 77c085d [master] Use Array#concat instead of Array#+=

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Dec 11 16:23:01 JST 2014


YUKI Hiroshi	2014-12-11 16:23:01 +0900 (Thu, 11 Dec 2014)

  New Revision: 77c085dd9b1fafe067916a32a6266dd2b2ed4312
  https://github.com/droonga/droonga-engine/commit/77c085dd9b1fafe067916a32a6266dd2b2ed4312

  Merged e0f9f34: Merge pull request #30 from piroor/replicas-in-a-branch

  Message:
    Use Array#concat instead of Array#+=

  Modified files:
    lib/droonga/catalog/replicas_volume.rb
    lib/droonga/catalog/slices_volume.rb

  Modified: lib/droonga/catalog/replicas_volume.rb (+2 -2)
===================================================================
--- lib/droonga/catalog/replicas_volume.rb    2014-12-11 16:19:34 +0900 (38ba4d1)
+++ lib/droonga/catalog/replicas_volume.rb    2014-12-11 16:23:01 +0900 (48abe58)
@@ -83,12 +83,12 @@ module Droonga
         when "broadcast"
           volumes = select(message["replica"].to_sym, live_nodes)
           volumes.each do |volume|
-            routes += volume.compute_routes(message, live_nodes)
+            routes.concat(volume.compute_routes(message, live_nodes))
           end
         when "scatter"
           volumes = select(message["replica"].to_sym, live_nodes)
           volumes.each do |volume|
-            routes += volume.compute_routes(message, live_nodes)
+            routes.concat(volume.compute_routes(message, live_nodes))
           end
         end
         routes.sort.uniq

  Modified: lib/droonga/catalog/slices_volume.rb (+2 -2)
===================================================================
--- lib/droonga/catalog/slices_volume.rb    2014-12-11 16:19:34 +0900 (c3da14c)
+++ lib/droonga/catalog/slices_volume.rb    2014-12-11 16:23:01 +0900 (6995776)
@@ -77,11 +77,11 @@ module Droonga
         when "broadcast"
           slices = select_slices
           slices.each do |slice|
-            routes += slice.compute_routes(message, live_nodes)
+            routes.concat(slice.compute_routes(message, live_nodes))
           end
         when "scatter"
           slice = choose_slice(message["record"])
-          routes += slice.compute_routes(message, live_nodes)
+          routes.concat(slice.compute_routes(message, live_nodes))
         end
         routes.sort.uniq
       end
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index