[Groonga-commit] droonga/fluent-plugin-droonga at d742c3e [master] Separate method chain

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Nov 7 14:43:23 JST 2013


YUKI Hiroshi	2013-11-07 14:43:23 +0900 (Thu, 07 Nov 2013)

  New Revision: d742c3eac7114b164418ac60095a69ba85616a79
  https://github.com/droonga/fluent-plugin-droonga/commit/d742c3eac7114b164418ac60095a69ba85616a79

  Message:
    Separate method chain

  Modified files:
    lib/droonga/watcher.rb

  Modified: lib/droonga/watcher.rb (+3 -2)
===================================================================
--- lib/droonga/watcher.rb    2013-11-07 11:32:45 +0900 (79a738d)
+++ lib/droonga/watcher.rb    2013-11-07 14:43:23 +0900 (4339b1b)
@@ -181,9 +181,10 @@ module Droonga
     def publish(hits, request)
       routes = {}
       hits.each do |query|
-        @subscriber_table.select do |subscriber|
+        subscribers = @subscriber_table.select do |subscriber|
           subscriber.subscriptions =~ query
-        end.each do |subscriber|
+        end
+        subscribers.each do |subscriber|
           routes[subscriber.route.key] ||= []
           routes[subscriber.route.key] << subscriber.key.key
         end
-------------- next part --------------
HTML����������������������������...
Download 



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