summaryrefslogtreecommitdiffstats
path: root/app/models/query.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-08-12 23:40:44 +0000
committerGo MAEDA <maeda@farend.jp>2018-08-12 23:40:44 +0000
commitb7f15fbadcaed2b708aa156048ab5c37cb7b01ff (patch)
treec87103a67f1cf7ec2c2ceb3aa441c5525493b8f8 /app/models/query.rb
parent02191a08fdd2b4267167230525dfbe676d751ce9 (diff)
downloadredmine-b7f15fbadcaed2b708aa156048ab5c37cb7b01ff.tar.gz
redmine-b7f15fbadcaed2b708aa156048ab5c37cb7b01ff.zip
Replace String#gsub with faster String#tr (#29363).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17469 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r--app/models/query.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index e32dda865..fa5c926ba 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -880,7 +880,7 @@ class Query < ActiveRecord::Base
filters_clauses << sql_for_custom_field(field, operator, v, $1)
elsif field =~ /^cf_(\d+)\.(.+)$/
filters_clauses << sql_for_custom_field_attribute(field, operator, v, $1, $2)
- elsif respond_to?(method = "sql_for_#{field.gsub('.','_')}_field")
+ elsif respond_to?(method = "sql_for_#{field.tr('.','_')}_field")
# specific statement
filters_clauses << send(method, field, operator, v)
else