summaryrefslogtreecommitdiffstats
path: root/app/helpers/imports_helper.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-10-24 06:46:50 +0000
committerGo MAEDA <maeda@farend.jp>2020-10-24 06:46:50 +0000
commit78dfef097803532fee664461f6485175917c1990 (patch)
tree9442d8a37c382e347c1928c250b1d939b8ae6ee6 /app/helpers/imports_helper.rb
parentb46953247da61845d7cd4600435c21012409aafb (diff)
downloadredmine-78dfef097803532fee664461f6485175917c1990.tar.gz
redmine-78dfef097803532fee664461f6485175917c1990.zip
Replace gsub with tr, delete, or squeeze (#34161).
git-svn-id: http://svn.redmine.org/redmine/trunk@20176 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/imports_helper.rb')
-rw-r--r--app/helpers/imports_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/imports_helper.rb b/app/helpers/imports_helper.rb
index c2d4c59ea..ab3a26b6e 100644
--- a/app/helpers/imports_helper.rb
+++ b/app/helpers/imports_helper.rb
@@ -46,7 +46,7 @@ module ImportsHelper
# Returns the options for the date_format setting
def date_format_options
Import::DATE_FORMATS.map do |f|
- format = f.gsub('%', '').gsub(/[dmY]/) do
+ format = f.delete('%').gsub(/[dmY]/) do
{'d' => 'DD', 'm' => 'MM', 'Y' => 'YYYY'}[$&]
end
[format, f]