OSDN Git Service

[shogi-server] Addressed a warning of duplicated range in a regular expression.
authorDaigo Moriwaki <daigo@debian.org>
Mon, 24 Nov 2014 14:03:29 +0000 (23:03 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Mon, 24 Nov 2014 14:03:29 +0000 (23:03 +0900)
changelog
shogi_server/login.rb

index 1432246..82f4473 100644 (file)
--- a/changelog
+++ b/changelog
@@ -3,6 +3,8 @@
        * Ruby 2.0:
          - Ruby 2.0.0 or later is recommended to use with shogi-server
            since Ruby 1.8 reached its End-of-Life on the end of July, 2014.
+       * [shogi-server]
+         - Addressed a warning of duplicated range in a regular expression.
 
 2014-07-19  Daigo Moriwaki <daigo at debian dot org>
 
index 5af4398..79e770e 100644 (file)
@@ -79,7 +79,7 @@ class Login
   end
 
   def Login.good_identifier?(str)
-    if str =~ /\A[\w\d_@\-\.]{1,#{Max_Identifier_Length}}\z/
+    if str =~ /\A[\w@\-\.]{1,#{Max_Identifier_Length}}\z/
       return true
     else
       return false