summaryrefslogtreecommitdiff
path: root/test/psych/test_object_references.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/test_object_references.rb')
-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)