From 1954eec80d7b9111920aa758b4c85405f907f671 Mon Sep 17 00:00:00 2001 From: why Date: Fri, 12 Dec 2003 18:08:58 +0000 Subject: * 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 --- lib/yaml/rubytypes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/yaml') 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] ) } -- cgit