OSDN Git Service

Fixed issue with `bundle exec rake routes` not running.
authorJason Hollingsworth <jhworth.developer@gmail.com>
Tue, 24 Dec 2013 02:01:38 +0000 (20:01 -0600)
committerJason Hollingsworth <jhworth.developer@gmail.com>
Tue, 24 Dec 2013 02:01:38 +0000 (20:01 -0600)
Wrap regex comments in (?#comment) construct.

lib/gitlab/regex.rb

index eb6b91e..93e013a 100644 (file)
@@ -24,20 +24,20 @@ module Gitlab
 
       %r{
         (?!
-           # doesn't begins with
-           \/|                    # (rule #6)
-           # doesn't contain
+           (?# doesn't begins with)
+           \/|                    (?# rule #6)
+           (?# doesn't contain)
            .*(?:
-              [\/.]\.|            # (rule #1,3)
-              \/\/|               # (rule #6)
-              @\{|                # (rule #8)
-              \\                  # (rule #9)
+              [\/.]\.|            (?# rule #1,3)
+              \/\/|               (?# rule #6)
+              @\{|                (?# rule #8)
+              \\                  (?# rule #9)
            )
         )
-        [^\000-\040\177~^:?*\[]+  # (rule #4-5)
-         # doesn't end with
-        (?<!\.lock)               # (rule #1)
-        (?<![\/.])                # (rule #6-7)
+        [^\000-\040\177~^:?*\[]+  (?# rule #4-5)
+        (?# doesn't end with)
+        (?<!\.lock)               (?# rule #1)
+        (?<![\/.])                (?# rule #6-7)
       }x
     end