Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/projects/topic.rb')
-rw-r--r--app/models/projects/topic.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/projects/topic.rb b/app/models/projects/topic.rb
index ed1795b43e0..347d65841ed 100644
--- a/app/models/projects/topic.rb
+++ b/app/models/projects/topic.rb
@@ -71,7 +71,7 @@ module Projects
# /\R/ - A linebreak: \n, \v, \f, \r \u0085 (NEXT LINE),
# \u2028 (LINE SEPARATOR), \u2029 (PARAGRAPH SEPARATOR) or \r\n.
- return unless name =~ /\R/
+ return unless /\R/.match?(name)
errors.add(:name, 'has characters that are not allowed')
end