[Groonga-commit] ranguba/groonga-client at 46007d8 [master] Reduce scope

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Oct 27 16:34:55 JST 2017


Kouhei Sutou	2017-10-27 16:34:55 +0900 (Fri, 27 Oct 2017)

  New Revision: 46007d87af49bb7cd39d09b66c4dcd01003b1f70
  https://github.com/ranguba/groonga-client/commit/46007d87af49bb7cd39d09b66c4dcd01003b1f70

  Message:
    Reduce scope

  Modified files:
    lib/groonga/client/command-line/groonga-client-index-check.rb

  Modified: lib/groonga/client/command-line/groonga-client-index-check.rb (+13 -12)
===================================================================
--- lib/groonga/client/command-line/groonga-client-index-check.rb    2017-10-27 16:34:32 +0900 (d591c2a)
+++ lib/groonga/client/command-line/groonga-client-index-check.rb    2017-10-27 16:34:55 +0900 (5dde2fc)
@@ -35,18 +35,19 @@ module Groonga
         def run(argv)
           targets = parse_command_line(argv)
 
-          @client = Client.new(:url      => @url,
-                               :protocol => @protocol,
-                               :host     => @host,
-                               :port     => @port,
-                               :backend  => :synchronous)
-          options = {
-            :check_missing_source => @check_missing_source,
-            :check_index_integrity => @check_index_integrity,
-            :target => targets
-          }
-          checker = Checker.new(@client, options)
-          checker.check
+          Client.open(:url      => @url,
+                      :protocol => @protocol,
+                      :host     => @host,
+                      :port     => @port,
+                      :backend  => :synchronous) do |client|
+            options = {
+              :check_missing_source => @check_missing_source,
+              :check_index_integrity => @check_index_integrity,
+              :target => targets
+            }
+            checker = Checker.new(client, options)
+            checker.check
+          end
         end
 
         private
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171027/e3a4b058/attachment.htm 



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