Merge the redundant when Symbol case to the when String, ...

This commit is contained in:
Ryuta Kamizono 2019-01-04 08:05:17 +09:00
parent e9aa0c5c72
commit 7a4e20e0cd

@ -159,7 +159,7 @@ def id_value_for_database(value)
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 @@ def _quote(value)
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