diff options
-rw-r--r-- | activerecord/lib/active_record/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 181c072211..77ad428685 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -648,10 +648,10 @@ module ActiveRecord #:nodoc: "#<#{self.class} #{inspection}>" end - if YAML.const_defined?(:ENGINE) + if RUBY_VERSION < '2.2' # Hackery to accomodate Syck. Remove for 4.0. def to_yaml(opts = {}) #:nodoc: - if !YAML::ENGINE.syck? + if YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck? super else coder = {} |