summaryrefslogtreecommitdiff
path: root/lib/yaml/rubytypes.rb
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
commitff2a47eb996b8bc03fc119b731689484c9eb3c78 (patch)
tree8dd656aa4d4dc33f73a13c8a5d490c0770f3e0f7 /lib/yaml/rubytypes.rb
parent30e14294a74915ab359de5bc45881c391e259c4c (diff)
* lib/yaml/rubytypes.rb: anonymous struct fix. [ruby-core:01946]
* test/yaml/test_yaml.rb: add test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml/rubytypes.rb')
-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 fed4370271..f718df9b9f 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] )
}