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

ruby-changes:28463

From: eregon <ko1@a...>
Date: Sun, 28 Apr 2013 23:34:58 +0900 (JST)
Subject: [ruby-changes:28463] eregon:r40515 (trunk): * lib/yaml.rb: Use another trick to define the YAML module.

eregon	2013-04-28 23:34:22 +0900 (Sun, 28 Apr 2013)

  New Revision: 40515

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

  Log:
    * lib/yaml.rb: Use another trick to define the YAML module.
      https://twitter.com/n0kada/status/328342207511801856

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40514)
+++ ChangeLog	(revision 40515)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Apr 28 23:34:01 2013  Benoit Daloze  <eregontp@g...>
+
+	* lib/yaml.rb: Use another trick to define the YAML module.
+	  https://twitter.com/n0kada/status/328342207511801856
+
 Sun Apr 28 23:19:00 2013  Zachary Scott  <zachary@z...>
 
 	* lib/pp.rb: Update PP module overview by @geopet
Index: lib/yaml.rb
===================================================================
--- lib/yaml.rb	(revision 40514)
+++ lib/yaml.rb	(revision 40515)
@@ -12,6 +12,8 @@ rescue LoadError https://github.com/ruby/ruby/blob/trunk/lib/yaml.rb#L12
   raise
 end
 
+YAML = Psych
+
 module Psych # :nodoc:
   class EngineManager
     # Returns the YAML engine in use.
@@ -79,5 +81,5 @@ end https://github.com/ruby/ruby/blob/trunk/lib/yaml.rb#L81
 #
 # For more advanced details on the implementation see Psych, and also check out
 # yaml.org for spec details and other helpful information.
-module YAML end if false
-YAML = Psych
+module YAML
+end

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

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