From 4eaf3d4a511611f0a81d2da23ffb72b7641507f3 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Mon, 23 May 2011 19:05:47 +0000 Subject: * lib/yaml.rb: switch default YAML engine to Psych, old syck engine may be enabled via YAML::ENGINE.yamler = "syck". [ruby-core:36374] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/yaml.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/yaml.rb') diff --git a/lib/yaml.rb b/lib/yaml.rb index 9b5a9b2787..dd89a30e3f 100644 --- a/lib/yaml.rb +++ b/lib/yaml.rb @@ -30,6 +30,14 @@ module YAML ENGINE = YAML::EngineManager.new end +begin + require 'psych' +rescue LoadError + warn "#{caller[0]}:" + warn "It seems your ruby installation is missing psych (for YAML output)." + warn "To eliminate this warning, please install libyaml and reinstall your ruby." +end + engine = (!defined?(Syck) && defined?(Psych) ? 'psych' : 'syck') module Syck -- cgit v1.2.3