A platform for community discussion. Free, open, simple.
DEV: More `send` -> `public_send`.
Guo Xiang Tan451f7842ff5f
diff --git a/app/jobs/regular/export_csv_file.rb b/app/jobs/regular/export_csv_file.rbindex f5e29ef7641..76aa5dbc9c4 100644--- a/app/jobs/regular/export_csv_file.rb+++ b/app/jobs/regular/export_csv_file.rb@@ -54,7 +54,7 @@ module Jobs# write to CSV fileCSV.open(absolute_path, "w") do |csv|csv << get_header- send(export_method).each { |d| csv << d }+ public_send(export_method).each { |d| csv << d }end# compress CSV filediff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rbindex 8753ce61f1f..eb66e91c017 100644--- a/lib/plugin/instance.rb+++ b/lib/plugin/instance.rb@@ -524,7 +524,7 @@ class Plugin::Instanceprovider = Auth::AuthProvider.newAuth::AuthProvider.auth_attributes.each do |sym|- provider.send "#{sym}=", opts.delete(sym) if opts.has_key?(sym)+ provider.public_send("#{sym}=", opts.delete(sym)) if opts.has_key?(sym)endbegindiff --git a/lib/search/grouped_search_results.rb b/lib/search/grouped_search_results.rbindex ffe5dcacf56..1f32eaad0a3 100644--- a/lib/search/grouped_search_results.rb+++ b/lib/search/grouped_search_results.rb@@ -60,7 +60,7 @@ class Searchelsif !@type_filter.present? && send(type).length == Search.per_facetinstance_variable_set("@more_#{type}".to_sym, true)else- (send type) << object+ (self.public_send(type)) << objectendenddiff --git a/lib/single_sign_on.rb b/lib/single_sign_on.rbindex 8320c2ebbb7..fd5b83e83bb 100644--- a/lib/single_sign_on.rb+++ b/lib/single_sign_on.rb@@ -128,8 +128,8 @@ class SingleSignOnpayload = {}ACCESSORS.each do |k|- next if (val = send k) == nil- payload[k] = val+ next if (val = public_send(k)) == nil+ payload[k] = valend@custom_fields&.each do |k, v|diff --git a/lib/stylesheet/functions.rb b/lib/stylesheet/functions.rbindex 49c2eae41c9..2e8a9009806 100644--- a/lib/stylesheet/functions.rb+++ b/lib/stylesheet/functions.rb@@ -9,4 +9,4 @@ module Stylesheetendend-::SassC::Script::Functions.send :include, Stylesheet::ScssFunctions+::SassC::Script::Functions.public_send(:include, Stylesheet::ScssFunctions)