[Groonga-commit] droonga/drntest at 1177db1 [master] Don't use matching before I read $2 of the previous matching

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 27 11:14:07 JST 2013


YUKI Hiroshi	2013-11-27 11:14:07 +0900 (Wed, 27 Nov 2013)

  New Revision: 1177db1e8ce0f925d01dcb792e3be0193e2e3d7b
  https://github.com/droonga/drntest/commit/1177db1e8ce0f925d01dcb792e3be0193e2e3d7b

  Message:
    Don't use matching before I read $2 of the previous matching

  Modified files:
    lib/drntest/test-runner.rb

  Modified: lib/drntest/test-runner.rb (+2 -2)
===================================================================
--- lib/drntest/test-runner.rb    2013-11-27 11:12:23 +0900 (b7286a9)
+++ lib/drntest/test-runner.rb    2013-11-27 11:14:07 +0900 (86aa020)
@@ -208,9 +208,9 @@ module Drntest
       loaded_options = {}
       Pathname(path).read.each_line do |line|
         next unless DIRECTIVE_MATCHER =~ line
-        key = $1.gsub("-", "_").to_sym
         # nil value means that it is a boolean option.
         value = $2 || true
+        key = $1.gsub("-", "_").to_sym
         if key == :include
           included = resolve_relative_path(value, options[:base_path] || base_path)
           included_options = load_options(included,
@@ -244,8 +244,8 @@ module Drntest
       Pathname(path).read.each_line do |line|
         if line[0] == "#"
           if DIRECTIVE_MATCHER =~ line
-            key = $1.gsub("-", "_").to_sym
             value = $2
+            key = $1.gsub("-", "_").to_sym
             case key
             when :include
               included = resolve_relative_path(value, options[:base_path] || base_path)
-------------- next part --------------
HTML����������������������������...
Download 



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