ruby-changes:2450
From: ko1@a...
Date: 16 Nov 2007 03:03:39 +0900
Subject: [ruby-changes:2450] why - Ruby:r13941 (trunk): * lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit.
why 2007-11-16 03:03:26 +0900 (Fri, 16 Nov 2007)
New Revision: 13941
Modified files:
trunk/ChangeLog
trunk/lib/yaml/types.rb
Log:
* lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/yaml/types.rb?r1=13941&r2=13940
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13941&r2=13940
Index: ChangeLog
===================================================================
--- ChangeLog (revision 13940)
+++ ChangeLog (revision 13941)
@@ -1,3 +1,7 @@
+Fri Nov 16 03:01:00 2007 why the lucky stiff <why@r...>
+
+ * lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit.
+
Fri Nov 16 02:51:59 2007 why the lucky stiff <why@r...>
* lib/yaml.rb (quick_emit): use combination of object_id and hash to
Index: lib/yaml/types.rb
===================================================================
--- lib/yaml/types.rb (revision 13940)
+++ lib/yaml/types.rb (revision 13941)
@@ -47,7 +47,7 @@
class Object
def self.tag_subclasses?; false; end
def to_yaml( opts = {} )
- YAML::quick_emit( object_id, opts ) do |out|
+ YAML::quick_emit( self, opts ) do |out|
out.map( "tag:ruby.yaml.org,2002:object:#{ @class }", to_yaml_style ) do |map|
@ivars.each do |k,v|
map.add( k, v )
@@ -125,7 +125,7 @@
true
end
def to_yaml( opts = {} )
- YAML::quick_emit( self.object_id, opts ) do |out|
+ YAML::quick_emit( self, opts ) do |out|
out.seq( taguri, to_yaml_style ) do |seq|
self.each do |v|
seq.add( Hash[ *v ] )
@@ -175,7 +175,7 @@
true
end
def to_yaml( opts = {} )
- YAML::quick_emit( self.object_id, opts ) do |out|
+ YAML::quick_emit( self, opts ) do |out|
out.seq( taguri, to_yaml_style ) do |seq|
self.each do |v|
seq.add( Hash[ *v ] )
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml