diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-19 11:45:39 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-19 11:45:39 +0000 |
commit | 09f5560c5721ad779cc2e740c4a77ad6aca1b530 (patch) | |
tree | 5d8d6ada2d2bed32c7d8f39dc616d9c26dbfac51 /lib/yaml/types.rb | |
parent | 8e3bfe98614414f027eed4e33b80dab0e938d13b (diff) |
Merge everything from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml/types.rb')
-rw-r--r-- | lib/yaml/types.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/yaml/types.rb b/lib/yaml/types.rb index 7897db48e0..3871c628fe 100644 --- a/lib/yaml/types.rb +++ b/lib/yaml/types.rb @@ -45,7 +45,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 ) @@ -123,7 +123,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 ] ) @@ -173,7 +173,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 ] ) |