summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Suschlik <ps@neopoly.de>2013-12-05 14:56:10 +0100
committerPeter Suschlik <ps@neopoly.de>2013-12-05 14:58:21 +0100
commit3844304da30c087743d8d1816c620d9bdc24ecc7 (patch)
treeff6e4284536ea4bbd603ec2e2c3bf336833ebcbe
parentb36cd3a8e8d87cd0b6681a750dcdf03fc2fddd20 (diff)
downloadpsych-3844304da30c087743d8d1816c620d9bdc24ecc7.tar.gz
Add failing test for Struct references
The tests fails with Psych::BadAlias: Unknown alias: 1
-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 9e2cf08..273b466 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)