summaryrefslogtreecommitdiffstats
path: root/lib/yaml
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-12 18:08:58 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-12 18:08:58 +0000
commit1954eec80d7b9111920aa758b4c85405f907f671 (patch)
tree8dd656aa4d4dc33f73a13c8a5d490c0770f3e0f7 /lib/yaml
parent232af9efc706919b271b89824d3d546d208c6b90 (diff)
downloadruby-1954eec80d7b9111920aa758b4c85405f907f671.tar.gz
ruby-1954eec80d7b9111920aa758b4c85405f907f671.tar.xz
ruby-1954eec80d7b9111920aa758b4c85405f907f671.zip
* lib/yaml/rubytypes.rb: anonymous struct fix. [ruby-core:01946]
* test/yaml/test_yaml.rb: add test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml')
-rw-r--r--lib/yaml/rubytypes.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb
index fed437027..f718df9b9 100644
--- a/lib/yaml/rubytypes.rb
+++ b/lib/yaml/rubytypes.rb
@@ -155,8 +155,8 @@ class Struct
#
# Basic struct is passed as a YAML map
#
- struct_name = self.class.name.gsub( "Struct:", "" )
- out.map( "!ruby/struct#{struct_name}" ) { |map|
+ struct_name = self.class.name.gsub( "Struct::", "" )
+ out.map( "!ruby/struct:#{struct_name}" ) { |map|
self.members.each { |m|
map.add( m, self[m] )
}