[Groonga-commit] groonga/groonga-command at 47d8d7a [master] Reduce scope

Back to archive index
Kouhei Sutou null+****@clear*****
Wed Mar 20 16:54:35 JST 2019


Kouhei Sutou	2019-03-20 16:54:35 +0900 (Wed, 20 Mar 2019)

  Revision: 47d8d7ae2f90f2d28558944e51742fa12f73be0c
  https://github.com/groonga/groonga-command/commit/47d8d7ae2f90f2d28558944e51742fa12f73be0c

  Message:
    Reduce scope

  Modified files:
    lib/groonga/command/format/elasticsearch.rb

  Modified: lib/groonga/command/format/elasticsearch.rb (+1 -1)
===================================================================
--- lib/groonga/command/format/elasticsearch.rb    2019-03-20 16:52:53 +0900 (f72e1e2)
+++ lib/groonga/command/format/elasticsearch.rb    2019-03-20 16:54:35 +0900 (8be9e3a)
@@ -58,7 +58,6 @@ module Groonga
               end
               components << JSON.generate(header)
             when :values
-              body = {}
               record = JSON.parse(value)
 
               if record[0].is_a?(::Array)
@@ -69,6 +68,7 @@ module Groonga
                     column_names = load_value
                     next
                   end
+                  body = {}
                   column_values = load_value
                   column_names.zip(column_values) do |column_name, column_value|
                     body[column_name] = column_value
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190320/35da6b92/attachment.html>


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