ruby-changes:26981
From: zzak <ko1@a...>
Date: Mon, 4 Feb 2013 02:40:42 +0900 (JST)
Subject: [ruby-changes:26981] zzak:r39033 (trunk): * lib/yaml.rb (YAML::EngineManager): Documentation for #yamler and
zzak 2013-02-04 02:40:30 +0900 (Mon, 04 Feb 2013) New Revision: 39033 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39033 Log: * lib/yaml.rb (YAML::EngineManager): Documentation for #yamler and #yamler= for using the removed Syck gem as the YAML::ENGINE Modified files: trunk/ChangeLog trunk/lib/yaml.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 39032) +++ ChangeLog (revision 39033) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Feb 4 02:40:00 2013 Zachary Scott <zachary@z...> + + * 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 <nobu@r...> * ext/io/console/io-console.gemspec: bump. [Bug #7762] Index: lib/yaml.rb =================================================================== --- lib/yaml.rb (revision 39032) +++ lib/yaml.rb (revision 39033) @@ -13,17 +13,31 @@ rescue LoadError https://github.com/ruby/ruby/blob/trunk/lib/yaml.rb#L13 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" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/