diff options
author | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-12 18:08:58 +0000 |
---|---|---|
committer | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-12 18:08:58 +0000 |
commit | ff2a47eb996b8bc03fc119b731689484c9eb3c78 (patch) | |
tree | 8dd656aa4d4dc33f73a13c8a5d490c0770f3e0f7 /test/yaml | |
parent | 30e14294a74915ab359de5bc45881c391e259c4c (diff) | |
download | ruby-ff2a47eb996b8bc03fc119b731689484c9eb3c78.tar.gz |
* 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 'test/yaml')
-rw-r--r-- | test/yaml/test_yaml.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/yaml/test_yaml.rb b/test/yaml/test_yaml.rb index cfb6407c29..35bb7c5f73 100644 --- a/test/yaml/test_yaml.rb +++ b/test/yaml/test_yaml.rb @@ -4,6 +4,11 @@ require 'test/unit' require 'yaml' +# [ruby-core:01946] +module YAML_Tests + StructTest = Struct::new( :c ) +end + class YAML_Unit_Tests < Test::Unit::TestCase # # Convert between YAML and the object to verify correct parsing and @@ -1058,6 +1063,12 @@ EOY isbn: None EOY ) + + assert_to_yaml( YAML_Tests::StructTest.new( 123 ), <<EOY ) +--- !ruby/struct:Test::StructTest +c: 123 +EOY + end def test_emitting_indicators |