diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-03 17:40:30 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-03 17:40:30 +0000 |
commit | 110a545d3f9161162eb358bd9323accb8b0b135b (patch) | |
tree | f3af542c14a991db9eef4ea57ff36d51703d67fa | |
parent | 80455c0d97ccf7dddaaeb871a118e3637760f91f (diff) |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/yaml.rb | 20 |
2 files changed, 22 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Mon Feb 4 02:40:00 2013 Zachary Scott <[email protected]> + + * 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 <[email protected]> * 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" |