[Groonga-commit] groonga/groonga-query-log [master] Analyzer: use ARGV as arguments for #run only when the executable calls it

アーカイブの一覧に戻る

Haruka Yoshihara null+****@clear*****
Thu Dec 13 15:35:26 JST 2012


Haruka Yoshihara	2012-12-13 15:35:26 +0900 (Thu, 13 Dec 2012)

  New Revision: 6a0cd52a51a5fbb1adadd653a896953b7b039ec8
  https://github.com/groonga/groonga-query-log/commit/6a0cd52a51a5fbb1adadd653a896953b7b039ec8

  Log:
    Analyzer: use ARGV as arguments for #run only when the executable calls it

  Modified files:
    bin/groonga-query-log-analyzer
    lib/groonga/query-log/analyzer.rb
    test/test-analyzer.rb

  Modified: bin/groonga-query-log-analyzer (+1 -1)
===================================================================
--- bin/groonga-query-log-analyzer    2012-12-13 15:29:14 +0900 (ca6fdd0)
+++ bin/groonga-query-log-analyzer    2012-12-13 15:35:26 +0900 (0c57314)
@@ -5,7 +5,7 @@ require "groonga/query-log"
 
 analyzer = Groonga::QueryLog::Analyzer.new
 begin
-  analyzer.run
+  analyzer.run(*ARGV)
 rescue Groonga::QueryLog::Analyzer::Error
   $stderr.puts($!.message)
   exit(false)

  Modified: lib/groonga/query-log/analyzer.rb (+2 -2)
===================================================================
--- lib/groonga/query-log/analyzer.rb    2012-12-13 15:29:14 +0900 (db173f9)
+++ lib/groonga/query-log/analyzer.rb    2012-12-13 15:35:26 +0900 (2c9c95a)
@@ -35,8 +35,8 @@ module Groonga
         setup_options
       end
 
-      def run(argv=nil)
-        log_paths = @option_parser.parse!(argv || ARGV)
+      def run(*argv)
+        log_paths = @option_parser.parse!(argv)
 
         stream = @options[:stream]
         dynamic_sort = @options[:dynamic_sort]

  Modified: test/test-analyzer.rb (+1 -1)
===================================================================
--- test/test-analyzer.rb    2012-12-13 15:29:14 +0900 (1ce44d3)
+++ test/test-analyzer.rb    2012-12-13 15:35:26 +0900 (075f232)
@@ -68,7 +68,7 @@ class AnalyzerTest < Test::Unit::TestCase
 
   private
   def run_analyzer(*arguments)
-    @analyzer.run(arguments)
+    @analyzer.run(*arguments)
     @output.string
   end
 
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る