diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-01-04 08:05:17 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-01-04 08:05:17 +0900 |
commit | 7a4e20e0cdd58b64520f1877430e18cfd3a6f730 (patch) | |
tree | 89a26ec33b7eccb83a746a6f2f0100feb4d81681 /activerecord | |
parent | e9aa0c5c727286e617d49c8cf0dc1031a05a9e95 (diff) | |
download | rails-7a4e20e0cdd58b64520f1877430e18cfd3a6f730.tar.gz rails-7a4e20e0cdd58b64520f1877430e18cfd3a6f730.tar.bz2 rails-7a4e20e0cdd58b64520f1877430e18cfd3a6f730.zip |
Merge the redundant `when Symbol` case to the `when String, ...`
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/quoting.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index 27f806cdfa..eefe621feb 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -159,7 +159,7 @@ module ActiveRecord def _quote(value) case value - when String, ActiveSupport::Multibyte::Chars + when String, Symbol, ActiveSupport::Multibyte::Chars "'#{quote_string(value.to_s)}'" when true then quoted_true when false then quoted_false @@ -170,7 +170,6 @@ module ActiveRecord when Type::Binary::Data then quoted_binary(value) when Type::Time::Value then "'#{quoted_time(value)}'" when Date, Time then "'#{quoted_date(value)}'" - when Symbol then "'#{quote_string(value.to_s)}'" when Class then "'#{value}'" else raise TypeError, "can't quote #{value.class.name}" end |