summaryrefslogtreecommitdiff
path: root/lib/yaml.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-30 00:30:46 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-30 00:30:46 +0000
commit8670d553685433ebfaefa2e19a19e41114a4e5bb (patch)
tree1c96b4f095c1442ffe94908918ed6202197ab147 /lib/yaml.rb
parent9802a3e7dec322e396783f7585dc76d6538a44a8 (diff)
* lib/yaml.rb: Document toplevel YAML and YAML::ENGINE to describe
Psych vs Syck engines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml.rb')
-rw-r--r--lib/yaml.rb18
1 files changed, 18 insertions, 0 deletions
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