aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/coders
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2012-05-31 09:46:52 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2012-05-31 10:01:59 -0700
commit5f690b97ba0dc411efc59789ad777c61cad198ae (patch)
tree54eec2f96060603ea761d1cecb3f693bf145987d /activerecord/lib/active_record/coders
parentda048de773cea8a970768f04cecd0b3dbb015772 (diff)
downloadrails-5f690b97ba0dc411efc59789ad777c61cad198ae.tar.gz
rails-5f690b97ba0dc411efc59789ad777c61cad198ae.tar.bz2
rails-5f690b97ba0dc411efc59789ad777c61cad198ae.zip
Psych is always available on 1.9
Diffstat (limited to 'activerecord/lib/active_record/coders')
-rw-r--r--activerecord/lib/active_record/coders/yaml_column.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/coders/yaml_column.rb b/activerecord/lib/active_record/coders/yaml_column.rb
index 66a0c83c41..f17e7158de 100644
--- a/activerecord/lib/active_record/coders/yaml_column.rb
+++ b/activerecord/lib/active_record/coders/yaml_column.rb
@@ -1,12 +1,10 @@
+require 'yaml'
+
module ActiveRecord
# :stopdoc:
module Coders
class YAMLColumn
- RESCUE_ERRORS = [ ArgumentError ]
-
- if defined?(Psych) && defined?(Psych::SyntaxError)
- RESCUE_ERRORS << Psych::SyntaxError
- end
+ RESCUE_ERRORS = [ ArgumentError, Psych::SyntaxError ]
attr_accessor :object_class