aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-04-13 11:41:34 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-13 11:41:42 -0700
commit1f4dae9daa8d5be44a676f59681c013e8f501e8f (patch)
treeecadad5498d54f86121fef70414cc638e2bd895f /activerecord/lib/active_record
parent0f8a6ebba39e278b9a4426cdc4f5139484585afd (diff)
downloadrails-1f4dae9daa8d5be44a676f59681c013e8f501e8f.tar.gz
rails-1f4dae9daa8d5be44a676f59681c013e8f501e8f.tar.bz2
rails-1f4dae9daa8d5be44a676f59681c013e8f501e8f.zip
do not depend on to_yaml being called, but rather depend on YAML being dumped
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/quoting.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
index 7489e88eef..325665dd87 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
@@ -35,7 +35,7 @@ module ActiveRecord
when Date, Time then "'#{quoted_date(value)}'"
when Symbol then "'#{quote_string(value.to_s)}'"
else
- "'#{quote_string(value.to_yaml)}'"
+ "'#{quote_string(YAML.dump(value))}'"
end
end