summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-09 00:54:37 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-09 00:54:37 +0000
commit7c6e4f8f38346a6cddfdae42a58567e668865238 (patch)
treef68e194b16821d563e5d39a1362d3a5c81fc6c27 /test/psych
parent5c0d17c9a2fbbb60e24cd6bd41ffdf8b63b07318 (diff)
* 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')
-rw-r--r--test/psych/test_object_references.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/psych/test_object_references.rb b/test/psych/test_object_references.rb
index 9e2cf08ad0e..273b466b0cd 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)