diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/yaml.rb | 18 |
2 files changed, 23 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Thu Jun 30 09:30:14 2011 Eric Hodel <[email protected]> + + * lib/yaml.rb: Document toplevel YAML and YAML::ENGINE to describe + Psych vs Syck engines. + Thu Jun 30 09:21:52 2011 Eric Hodel <[email protected]> * lib/cmath.rb: Hide handle_no_method_error from RDoc. diff --git a/lib/yaml.rb b/lib/yaml.rb index eb0427a9d4..ff9e1a6344 100644 --- a/lib/yaml.rb +++ b/lib/yaml.rb @@ -1,3 +1,18 @@ +## +# The YAML module allows you to use one of the two YAML engines that ship with +# ruby. By default Psych is used but the old and unmaintained Syck may be +# chosen. +# +# See Psych or Syck for usage and documentation. +# +# To set the YAML engine to syck: +# +# YAML::ENGINE.yamler = 'syck' +# +# To set the YAML engine back to psych: +# +# YAML::ENGINE.yamler = 'psych' + module YAML class EngineManager # :nodoc: attr_reader :yamler @@ -27,6 +42,9 @@ module YAML end end + ## + # Allows changing the current YAML engine. See YAML for details. + ENGINE = YAML::EngineManager.new end |