diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | lib/yaml.rb | 8 |
3 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue May 24 04:01:46 2011 Aaron Patterson <[email protected]> + + * lib/yaml.rb: switch default YAML engine to Psych, old syck engine + may be enabled via YAML::ENGINE.yamler = "syck". [ruby-core:36374] + Mon May 23 09:45:26 2011 Hiroshi Nakamura <[email protected]> * include/ruby/defines.h (CASEFOLD_FILESYSTEM): Revert r30508. Forgot to @@ -149,6 +149,10 @@ with all sufficient information, see the ChangeLog file. * new logging directive: * %{remote}p for remote (client) port number. +* yaml + * The default YAML engine is now Psych. You may downgrade to syck by setting + YAML::ENGINE.yamler = 'syck'. + * zlib * new methods: * Zlib.deflate 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 |