[Groonga-commit] droonga/drntest at 0584cd4 [master] Ignore line breaks on the end of line

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 27 16:25:03 JST 2013


YUKI Hiroshi	2013-11-27 16:25:03 +0900 (Wed, 27 Nov 2013)

  New Revision: 0584cd4438f3f14a703c4c7102eb1facb41a9687
  https://github.com/droonga/drntest/commit/0584cd4438f3f14a703c4c7102eb1facb41a9687

  Message:
    Ignore line breaks on the end of line

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

  Modified: lib/drntest/test-runner.rb (+3 -3)
===================================================================
--- lib/drntest/test-runner.rb    2013-11-27 16:24:36 +0900 (ff5e839)
+++ lib/drntest/test-runner.rb    2013-11-27 16:25:03 +0900 (05e4206)
@@ -183,18 +183,18 @@ module Drntest
     end
 
     class Directive
-      MATCHER = /\A\#\@([^\s]+)(?:\s+(.+))?\n?\z/.freeze
+      MATCHER = /\A\#\@([^\s]+)(?:\s+(.+))?\z/.freeze
 
       class << self
         def directive?(source)
-          MATCHER =~ source
+          MATCHER =~ source.strip
         end
       end
 
       attr_reader :type, :value
 
       def initialize(source)
-        MATCHER =~ source
+        MATCHER =~ source.strip
         @value = $2
         @type = $1.gsub("-", "_").to_sym
       end
-------------- next part --------------
HTML����������������������������...
Download 



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