[Groonga-commit] droonga/droonga-engine at c5542e8 [master] Suppress a warning

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Apr 24 16:50:28 JST 2014


Kouhei Sutou	2014-04-24 16:50:28 +0900 (Thu, 24 Apr 2014)

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

  Message:
    Suppress a warning
    
        lib/droonga/session.rb:76: warning: shadowing outer local variable - name

  Modified files:
    lib/droonga/session.rb

  Modified: lib/droonga/session.rb (+14 -10)
===================================================================
--- lib/droonga/session.rb    2014-04-24 16:48:37 +0900 (abbd6a1)
+++ lib/droonga/session.rb    2014-04-24 16:50:28 +0900 (929b4b7)
@@ -73,21 +73,25 @@ module Droonga
           end
           @dispatcher.reply("body" => reply_body)
         end
-        step["descendants"].each do |name, routes|
-          message = {
-            "id" => @id,
-            "input" => name,
-            "value" => result[name]
-          }
-          routes.each do |route|
-            @dispatcher.dispatch(message, route)
-          end
-        end
+        send_to_descendantas(step["descendants"], result)
         @n_dones += 1
       end
     end
 
     private
+    def send_to_descendantas(descendantas, result)
+      descendantas.each do |name, routes|
+        message = {
+          "id" => @id,
+          "input" => name,
+          "value" => result[name]
+        }
+        routes.each do |route|
+          @dispatcher.dispatch(message, route)
+        end
+      end
+    end
+
     def log_tag
       "session"
     end
-------------- next part --------------
HTML����������������������������...
Download 



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