From 91e0600535329f9fda341ebc876b6ddef9c0ea8c Mon Sep 17 00:00:00 2001 From: why Date: Thu, 15 Nov 2007 18:03:26 +0000 Subject: * lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/yaml/types.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/yaml/types.rb b/lib/yaml/types.rb index 05113f216d..4396e36df2 100644 --- a/lib/yaml/types.rb +++ b/lib/yaml/types.rb @@ -47,7 +47,7 @@ module YAML 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 @@ module YAML 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 @@ module YAML 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 ] ) -- cgit v1.2.3