[前][次][番号順一覧][スレッド一覧]

ruby-changes:20265

From: drbrain <ko1@a...>
Date: Thu, 30 Jun 2011 09:30:52 +0900 (JST)
Subject: [ruby-changes:20265] drbrain:r32313 (trunk): * lib/yaml.rb: Document toplevel YAML and YAML::ENGINE to describe

drbrain	2011-06-30 09:30:46 +0900 (Thu, 30 Jun 2011)

  New Revision: 32313

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32313

  Log:
    * lib/yaml.rb:  Document toplevel YAML and YAML::ENGINE to describe
      Psych vs Syck engines.

  Modified files:
    trunk/ChangeLog
    trunk/lib/yaml.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32312)
+++ ChangeLog	(revision 32313)
@@ -1,3 +1,8 @@
+Thu Jun 30 09:30:14 2011  Eric Hodel  <drbrain@s...>
+
+	* lib/yaml.rb:  Document toplevel YAML and YAML::ENGINE to describe
+	  Psych vs Syck engines.
+
 Thu Jun 30 09:21:52 2011  Eric Hodel  <drbrain@s...>
 
 	* lib/cmath.rb:  Hide handle_no_method_error from RDoc.
Index: lib/yaml.rb
===================================================================
--- lib/yaml.rb	(revision 32312)
+++ lib/yaml.rb	(revision 32313)
@@ -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 @@
     end
   end
 
+  ##
+  # Allows changing the current YAML engine.  See YAML for details.
+
   ENGINE = YAML::EngineManager.new
 end
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]