aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-10-12 11:48:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-10-12 11:48:41 -0700
commit9852a724177cb5f65d5b37c0511cfacea2a3ebb6 (patch)
tree33968f55ca9bcc77db905701a6b4f2619ae80985 /activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
parentc882154cd121ea494019afa0c9ce8d31767de691 (diff)
downloadrails-9852a724177cb5f65d5b37c0511cfacea2a3ebb6.tar.gz
rails-9852a724177cb5f65d5b37c0511cfacea2a3ebb6.tar.bz2
rails-9852a724177cb5f65d5b37c0511cfacea2a3ebb6.zip
removing intermediate variables
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/quoting.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/quoting.rb3
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 820c6d9f0c..603e4de564 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
@@ -17,8 +17,7 @@ module ActiveRecord
if column.type == :binary && column.class.respond_to?(:string_to_binary)
"'#{quote_string(column.class.string_to_binary(value))}'" # ' (for ruby-mode)
elsif [:integer, :float].include?(column.type)
- value = column.type == :integer ? value.to_i : value.to_f
- value.to_s
+ (column.type == :integer ? value.to_i : value.to_f).to_s
else
"'#{quote_string(value)}'" # ' (for ruby-mode)
end