diff options
author | Leigh Halliday <leigh.halliday@thescore.com> | 2015-08-28 16:00:48 -0400 |
---|---|---|
committer | Leigh Halliday <leigh.halliday@thescore.com> | 2015-08-28 16:20:02 -0400 |
commit | 7abbe137b7d19686f3a3be1414fadd41b7886334 (patch) | |
tree | 2aaa6eaef47d28ceb30612ebf796ea265b105273 /activesupport/lib | |
parent | cbe7899f9d5fece4749f75828fd120d67056f356 (diff) | |
download | rails-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')
-rw-r--r-- | activesupport/lib/active_support/array_inquirer.rb | 2 |
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 |