summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/settings_controller.rb4
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--app/helpers/my_helper.rb2
-rw-r--r--app/models/auth_source_ldap.rb2
-rw-r--r--app/models/comment.rb2
-rw-r--r--app/models/custom_field_value.rb2
-rw-r--r--app/models/import.rb2
-rw-r--r--app/models/issue.rb4
-rw-r--r--app/models/mail_handler.rb2
-rw-r--r--app/models/project.rb2
-rw-r--r--app/models/query.rb2
-rw-r--r--app/models/setting.rb2
-rw-r--r--lib/redmine/ciphering.rb2
-rw-r--r--lib/redmine/configuration.rb2
-rw-r--r--lib/redmine/helpers/gantt.rb8
-rw-r--r--lib/redmine/plugin.rb2
-rw-r--r--lib/redmine/wiki_formatting/textile/redcloth3.rb10
-rw-r--r--test/unit/auth_source_ldap_test.rb2
-rw-r--r--test/unit/lib/redmine/safe_attributes_test.rb2
19 files changed, 28 insertions, 28 deletions
diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb
index 9a595f3f2..9fb08d651 100644
--- a/app/controllers/settings_controller.rb
+++ b/app/controllers/settings_controller.rb
@@ -70,12 +70,12 @@ class SettingsController < ApplicationController
if request.post?
setting = params[:settings] ? params[:settings].permit!.to_h : {}
- Setting.send "plugin_#{@plugin.id}=", setting
+ Setting.send :"plugin_#{@plugin.id}=", setting
flash[:notice] = l(:notice_successful_update)
redirect_to plugin_settings_path(@plugin)
else
@partial = @plugin.settings[:partial]
- @settings = Setting.send "plugin_#{@plugin.id}"
+ @settings = Setting.send :"plugin_#{@plugin.id}"
end
rescue Redmine::PluginNotFound
render_404
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e1b22eb75..148d07b3e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1503,7 +1503,7 @@ module ApplicationHelper
# Render the error messages for the given objects
def error_messages_for(*objects)
- objects = objects.filter_map {|o| o.is_a?(String) ? instance_variable_get("@#{o}") : o}
+ objects = objects.filter_map {|o| o.is_a?(String) ? instance_variable_get(:"@#{o}") : o}
errors = objects.map {|o| o.errors.full_messages}.flatten
render_error_messages(errors)
end
diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb
index b7151f999..1abecce96 100644
--- a/app/helpers/my_helper.rb
+++ b/app/helpers/my_helper.rb
@@ -61,7 +61,7 @@ module MyHelper
return nil
end
else
- send "render_#{block_definition[:name]}_block", block, settings
+ send :"render_#{block_definition[:name]}_block", block, settings
end
end
diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb
index a2d43b7f7..9cafd9b0e 100644
--- a/app/models/auth_source_ldap.rb
+++ b/app/models/auth_source_ldap.rb
@@ -86,7 +86,7 @@ class AuthSourceLdap < AuthSource
# Returns true if this source can be searched for users
def searchable?
- !account.to_s.include?("$login") && %w(login firstname lastname mail).all? {|a| send("attr_#{a}?")}
+ !account.to_s.include?("$login") && %w(login firstname lastname mail).all? {|a| send(:"attr_#{a}?")}
end
# Searches the source for users and returns an array of results
diff --git a/app/models/comment.rb b/app/models/comment.rb
index 0954bd707..525a3a4ab 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -41,7 +41,7 @@ class Comment < ActiveRecord::Base
def send_notification
event = "#{commented.class.name.underscore}_comment_added"
if Setting.notified_events.include?(event)
- Mailer.public_send("deliver_#{event}", self)
+ Mailer.public_send(:"deliver_#{event}", self)
end
end
end
diff --git a/app/models/custom_field_value.rb b/app/models/custom_field_value.rb
index ee154af2c..88fadf280 100644
--- a/app/models/custom_field_value.rb
+++ b/app/models/custom_field_value.rb
@@ -23,7 +23,7 @@ class CustomFieldValue
def initialize(attributes={})
attributes.each do |name, v|
- send "#{name}=", v
+ send :"#{name}=", v
end
end
diff --git a/app/models/import.rb b/app/models/import.rb
index 2674606bb..8fcb769d3 100644
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@ -184,7 +184,7 @@ class Import < ActiveRecord::Base
def do_callbacks(position, object)
if callbacks = (settings['callbacks'] || {}).delete(position)
callbacks.each do |name, args|
- send "#{name}_callback", object, *args
+ send :"#{name}_callback", object, *args
end
save!
end
diff --git a/app/models/issue.rb b/app/models/issue.rb
index ac0786d33..120bddd9b 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -472,7 +472,7 @@ class Issue < ActiveRecord::Base
%w(project project_id tracker tracker_id).each do |attr|
if attrs.has_key?(attr)
- send "#{attr}=", attrs.delete(attr)
+ send :"#{attr}=", attrs.delete(attr)
end
end
super(attrs, *args)
@@ -2067,7 +2067,7 @@ class Issue < ActiveRecord::Base
def clear_disabled_fields
if tracker
tracker.disabled_core_fields.each do |attribute|
- send "#{attribute}=", nil
+ send :"#{attribute}=", nil
end
self.priority_id ||= IssuePriority.default&.id || IssuePriority.active.first.id
self.done_ratio ||= 0
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index ecedd2ccf..b1f8d304a 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -578,7 +578,7 @@ class MailHandler < ActionMailer::Base
def self.assign_string_attribute_with_limit(object, attribute, value, limit=nil)
limit ||= object.class.columns_hash[attribute.to_s].limit || 255
value = value.to_s.slice(0, limit)
- object.send("#{attribute}=", value)
+ object.send(:"#{attribute}=", value)
end
private_class_method :assign_string_attribute_with_limit
diff --git a/app/models/project.rb b/app/models/project.rb
index 1bf5f913c..082e83f55 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -944,7 +944,7 @@ class Project < ActiveRecord::Base
end
to_be_copied.each do |name|
- send "copy_#{name}", project
+ send :"copy_#{name}", project
end
Redmine::Hook.call_hook(:model_project_copy_before_save,
:source_project => project,
diff --git a/app/models/query.rb b/app/models/query.rb
index f0c29ea98..31ffe6a13 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -1110,7 +1110,7 @@ class Query < ActiveRecord::Base
custom_field = column.custom_field
send :total_for_custom_field, custom_field, scope
else
- send "total_for_#{column.name}", scope
+ send :"total_for_#{column.name}", scope
end
rescue ::ActiveRecord::StatementInvalid => e
raise StatementInvalid.new(e.message)
diff --git a/app/models/setting.rb b/app/models/setting.rb
index a44f92ce3..8ee5b1f50 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -169,7 +169,7 @@ class Setting < ActiveRecord::Base
/\s*,\s*/]
].each do |enable_regex, regex_field, delimiter|
if settings.key?(regex_field) || settings.key?(enable_regex)
- regexp = Setting.send("#{enable_regex}?")
+ regexp = Setting.send(:"#{enable_regex}?")
if settings.key?(enable_regex)
regexp = settings[enable_regex].to_s != '0'
end
diff --git a/lib/redmine/ciphering.rb b/lib/redmine/ciphering.rb
index 2806ae14d..f3397446f 100644
--- a/lib/redmine/ciphering.rb
+++ b/lib/redmine/ciphering.rb
@@ -73,7 +73,7 @@ module Redmine
transaction do
all.each do |object|
clear = object.send(attribute)
- object.send "#{attribute}=", clear
+ object.send :"#{attribute}=", clear
raise(ActiveRecord::Rollback) unless object.save(validate: false)
end
end ? true : false
diff --git a/lib/redmine/configuration.rb b/lib/redmine/configuration.rb
index 3e604cab3..43506836f 100644
--- a/lib/redmine/configuration.rb
+++ b/lib/redmine/configuration.rb
@@ -66,7 +66,7 @@ module Redmine
"Please update your config/configuration.yml to use :#$1 delivery method instead."
end
v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
- ActionMailer::Base.send("#{k}=", v)
+ ActionMailer::Base.send(:"#{k}=", v)
end
end
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index b33fc3223..a7b0d715d 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -270,8 +270,8 @@ module Redmine
def render_object_row(object, options)
class_name = object.class.name.downcase
- send("subject_for_#{class_name}", object, options) unless options[:only] == :lines || options[:only] == :selected_columns
- send("line_for_#{class_name}", object, options) unless options[:only] == :subjects || options[:only] == :selected_columns
+ send(:"subject_for_#{class_name}", object, options) unless options[:only] == :lines || options[:only] == :selected_columns
+ send(:"line_for_#{class_name}", object, options) unless options[:only] == :subjects || options[:only] == :selected_columns
column_content_for_issue(object, options) if options[:only] == :selected_columns && options[:column].present? && object.is_a?(Issue)
options[:top] += options[:top_increment]
@number_of_rows += 1
@@ -361,14 +361,14 @@ module Redmine
end
def subject(label, options, object=nil)
- send "#{options[:format]}_subject", options, label, object
+ send :"#{options[:format]}_subject", options, label, object
end
def line(start_date, end_date, done_ratio, markers, label, options, object=nil)
options[:zoom] ||= 1
options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]
coords = coordinates(start_date, end_date, done_ratio, options[:zoom])
- send "#{options[:format]}_task", options, coords, markers, label, object
+ send :"#{options[:format]}_task", options, coords, markers, label, object
end
# Generates a gantt image
diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb
index 0fb762de9..8107a5a39 100644
--- a/lib/redmine/plugin.rb
+++ b/lib/redmine/plugin.rb
@@ -71,7 +71,7 @@ module Redmine
class_eval do
names.each do |name|
define_method(name) do |*args|
- args.empty? ? instance_variable_get("@#{name}") : instance_variable_set("@#{name}", *args)
+ args.empty? ? instance_variable_get(:"@#{name}") : instance_variable_set(:"@#{name}", *args)
end
end
end
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index e319d90db..f545bdf91 100644
--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
@@ -255,7 +255,7 @@ class RedCloth3 < String
# #=>"<h1>A &lt;b&gt;bold&lt;/b&gt; man</h1>"
#
def initialize( string, restrictions = [] )
- restrictions.each { |r| method( "#{r}=" ).call( true ) }
+ restrictions.each { |r| method( :"#{r}=" ).call( true ) }
super( string )
end
@@ -724,10 +724,10 @@ class RedCloth3 < String
# pass to prefix handler
replacement = nil
- if respond_to? "textile_#{tag}", true
- replacement = method( "textile_#{tag}" ).call( tag, atts, cite, content )
- elsif respond_to? "textile_#{tagpre}_", true
- replacement = method( "textile_#{tagpre}_" ).call( tagpre, num, atts, cite, content )
+ if respond_to? :"textile_#{tag}", true
+ replacement = method( :"textile_#{tag}" ).call( tag, atts, cite, content )
+ elsif respond_to? :"textile_#{tagpre}_", true
+ replacement = method( :"textile_#{tagpre}_" ).call( tagpre, num, atts, cite, content )
end
text.gsub!( $& ) { replacement } if replacement
end
diff --git a/test/unit/auth_source_ldap_test.rb b/test/unit/auth_source_ldap_test.rb
index 1dbdb3b73..97b11f53f 100644
--- a/test/unit/auth_source_ldap_test.rb
+++ b/test/unit/auth_source_ldap_test.rb
@@ -130,7 +130,7 @@ class AuthSourceLdapTest < ActiveSupport::TestCase
assert_equal 'example1@redmine.org', attributes[:mail]
assert_equal auth.id, attributes[:auth_source_id]
attributes.each_key do |attribute|
- assert User.new.respond_to?("#{attribute}="), "Unexpected :#{attribute} attribute returned"
+ assert User.new.respond_to?(:"#{attribute}="), "Unexpected :#{attribute} attribute returned"
end
end
diff --git a/test/unit/lib/redmine/safe_attributes_test.rb b/test/unit/lib/redmine/safe_attributes_test.rb
index 4f031b816..99059f326 100644
--- a/test/unit/lib/redmine/safe_attributes_test.rb
+++ b/test/unit/lib/redmine/safe_attributes_test.rb
@@ -25,7 +25,7 @@ class Redmine::SafeAttributesTest < ActiveSupport::TestCase
class Base
def attributes=(attrs)
attrs.each do |key, value|
- send("#{key}=", value)
+ send(:"#{key}=", value)
end
end
end