From: Daigo Moriwaki Date: Mon, 24 Nov 2014 14:03:29 +0000 (+0900) Subject: [shogi-server] Addressed a warning of duplicated range in a regular expression. X-Git-Tag: 20170902~26^2~1 X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=3da57bcb8a3fe0753846510d5fdddbe461f2906c;p=shogi-server%2Fshogi-server.git [shogi-server] Addressed a warning of duplicated range in a regular expression. --- diff --git a/changelog b/changelog index 1432246..82f4473 100644 --- 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 diff --git a/shogi_server/login.rb b/shogi_server/login.rb index 5af4398..79e770e 100644 --- a/shogi_server/login.rb +++ b/shogi_server/login.rb @@ -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