aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/array_inquirer.rb
diff options
context:
space:
mode:
authorLeigh Halliday <leigh.halliday@thescore.com>2015-08-28 16:00:48 -0400
committerLeigh Halliday <leigh.halliday@thescore.com>2015-08-28 16:20:02 -0400
commit7abbe137b7d19686f3a3be1414fadd41b7886334 (patch)
tree2aaa6eaef47d28ceb30612ebf796ea265b105273 /activesupport/lib/active_support/array_inquirer.rb
parentcbe7899f9d5fece4749f75828fd120d67056f356 (diff)
downloadrails-7abbe137b7d19686f3a3be1414fadd41b7886334.tar.gz
rails-7abbe137b7d19686f3a3be1414fadd41b7886334.tar.bz2
rails-7abbe137b7d19686f3a3be1414fadd41b7886334.zip
ArrayInquirer to correctly find symbols or strings
The problem existed where if your ArrayInquirer values were strings but you checked them using any? with a symbol, it would not find the value. Now it will correctly check whether both the String form or the Symbol form are included in the Array. `
Diffstat (limited to 'activesupport/lib/active_support/array_inquirer.rb')
-rw-r--r--activesupport/lib/active_support/array_inquirer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/array_inquirer.rb b/activesupport/lib/active_support/array_inquirer.rb
index e7188d7adb..f59ddf5403 100644
--- a/activesupport/lib/active_support/array_inquirer.rb
+++ b/activesupport/lib/active_support/array_inquirer.rb
@@ -23,7 +23,7 @@ module ActiveSupport
super
else
candidates.any? do |candidate|
- include?(candidate) || include?(candidate.to_sym)
+ include?(candidate.to_sym) || include?(candidate.to_s)
end
end
end