aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-21 17:53:28 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-21 17:53:28 -0800
commit59f3218463228ca2301857cd7bf4f82f308924a6 (patch)
treea0f56c3b4f59b22014dac1bbf9444ebc640b6180 /activerecord/lib/active_record/base.rb
parent3d6e223b8457a0bfae0debbc172cb44575a7858a (diff)
downloadrails-59f3218463228ca2301857cd7bf4f82f308924a6.tar.gz
rails-59f3218463228ca2301857cd7bf4f82f308924a6.tar.bz2
rails-59f3218463228ca2301857cd7bf4f82f308924a6.zip
load and prefer psych as the YAML parser when it is available
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rw-r--r--activerecord/lib/active_record/base.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 47dc2d4a3a..00324b14f2 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1,3 +1,8 @@
+begin
+ require 'psych'
+rescue LoadError
+end
+
require 'yaml'
require 'set'
require 'active_support/benchmarkable'