[Groonga-commit] droonga/drntest at 93eac0b [master] Use Regexp#=~ instead of String#=~

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Nov 25 23:35:09 JST 2013


Kouhei Sutou	2013-11-25 23:35:09 +0900 (Mon, 25 Nov 2013)

  New Revision: 93eac0b5ef3cd29dde98afb23a4bbd6f3de08187
  https://github.com/droonga/drntest/commit/93eac0b5ef3cd29dde98afb23a4bbd6f3de08187

  Message:
    Use Regexp#=~ instead of String#=~
    
    Because "match" opration is provided by Regexp not String.

  Modified files:
    lib/drntest/tester.rb

  Modified: lib/drntest/tester.rb (+1 -1)
===================================================================
--- lib/drntest/tester.rb    2013-11-25 23:34:19 +0900 (403cbc4)
+++ lib/drntest/tester.rb    2013-11-25 23:35:09 +0900 (43d8632)
@@ -71,7 +71,7 @@ module Drntest
 
         parser.on("--test=PATTERN",
                   "Run only tests which have a name matched to the given PATTERN") do |pattern|
-          if pattern =~ /\A\/.+\/\z/
+          if /\A\/.+\/\z/ =~ pattern
             pattern = Regexp.new(pattern[1..-2])
           end
           tester.pattern = pattern
-------------- next part --------------
HTML����������������������������...
下載 



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