From 110a545d3f9161162eb358bd9323accb8b0b135b Mon Sep 17 00:00:00 2001 From: zzak Date: Sun, 3 Feb 2013 17:40:30 +0000 Subject: * lib/yaml.rb (YAML::EngineManager): Documentation for #yamler and #yamler= for using the removed Syck gem as the YAML::ENGINE git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/yaml.rb | 20 +++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86ca3f714e..3608505ea1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 4 02:40:00 2013 Zachary Scott + + * lib/yaml.rb (YAML::EngineManager): Documentation for #yamler and + #yamler= for using the removed Syck gem as the YAML::ENGINE + Sun Feb 3 16:54:27 2013 Nobuyoshi Nakada * ext/io/console/io-console.gemspec: bump. [Bug #7762] diff --git a/lib/yaml.rb b/lib/yaml.rb index 19df5efc53..93e869cd79 100644 --- a/lib/yaml.rb +++ b/lib/yaml.rb @@ -13,17 +13,31 @@ rescue LoadError end module Psych - class EngineManager # :nodoc: + class EngineManager + # Returns the YAML engine in use. + # + # By default Psych is used but the old and unmaintained Syck may be chosen. + # + # See #yamler= for more information. attr_reader :yamler - def initialize + def initialize # :nodoc: @yamler = 'psych' end - def syck? + def syck? # :nodoc: false end + # By default Psych is used but the old and unmaintained Syck may be chosen. + # + # After installing the 'syck' gem, you can set the YAML engine to syck: + # + # YAML::ENGINE.yamler = 'syck' + # + # To set the YAML engine back to psych: + # + # YAML::ENGINE.yamler = 'psych' def yamler= engine case engine when 'syck' then warn "syck has been removed" -- cgit v1.2.3