summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-15 18:03:26 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-15 18:03:26 +0000
commitf9b0c70309676c6adf182eb3172145da78cd0ba0 (patch)
tree157c3f56b2d31c8791802c50b35d10f0d72fdb73 /lib
parent4dc29e295fd9fdff4fb20ab185def0bdd4d3a944 (diff)
downloadruby-f9b0c70309676c6adf182eb3172145da78cd0ba0.tar.gz
ruby-f9b0c70309676c6adf182eb3172145da78cd0ba0.tar.xz
ruby-f9b0c70309676c6adf182eb3172145da78cd0ba0.zip
* lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/yaml/types.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/yaml/types.rb b/lib/yaml/types.rb
index 05113f216..4396e36df 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 ] )