diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-09 00:54:37 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-09 00:54:37 +0000 |
commit | 7c6e4f8f38346a6cddfdae42a58567e668865238 (patch) | |
tree | f68e194b16821d563e5d39a1362d3a5c81fc6c27 /test/psych/test_object_references.rb | |
parent | 5c0d17c9a2fbbb60e24cd6bd41ffdf8b63b07318 (diff) | |
download | ruby-7c6e4f8f38346a6cddfdae42a58567e668865238.tar.gz |
* ext/psych/lib/psych/visitors/to_ruby.rb: anonymous structs
should be able to roundtrip. Thanks @splattael!
* test/psych/test_object_references.rb: test for change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych/test_object_references.rb')
-rw-r--r-- | test/psych/test_object_references.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/psych/test_object_references.rb b/test/psych/test_object_references.rb index 9e2cf08ad0..273b466b0c 100644 --- a/test/psych/test_object_references.rb +++ b/test/psych/test_object_references.rb @@ -26,6 +26,10 @@ module Psych assert_reference_trip DateTime.now end + def test_struct_has_references + assert_reference_trip Struct.new(:foo).new(1) + end + def assert_reference_trip obj yml = Psych.dump([obj, obj]) assert_match(/\*-?\d+/, yml) |