[Groonga-commit] ranguba/rroonga at 6757c7e [master] Convert option type by option parser

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Feb 21 16:39:01 JST 2016


Kouhei Sutou	2016-02-21 16:39:01 +0900 (Sun, 21 Feb 2016)

  New Revision: 6757c7e43452ad680906e7525910094f6da63764
  https://github.com/ranguba/rroonga/commit/6757c7e43452ad680906e7525910094f6da63764

  Message:
    Convert option type by option parser

  Modified files:
    bin/grndump

  Modified: bin/grndump (+2 -2)
===================================================================
--- bin/grndump    2016-02-21 16:37:06 +0900 (1640cff)
+++ bin/grndump    2016-02-21 16:39:01 +0900 (48e0622)
@@ -81,10 +81,10 @@ option_parser = OptionParser.new do |parser|
     options.order_by = type
   end
 
-  parser.on("--max-records=NUMBER",
+  parser.on("--max-records=NUMBER", Integer,
             "max NUMBER of records to dump",
             "(#{options.max_records})") do |number|
-    options.max_records = number.to_i
+    options.max_records = number
   end
 end
 args = option_parser.parse!(ARGV)
-------------- next part --------------
HTML����������������������������...
Download 



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