diff --git a/test/psych/test_alias_and_anchor.rb b/test/psych/test_alias_and_anchor.rb index 7cb5a6e5..f42ca287 100644 --- a/test/psych/test_alias_and_anchor.rb +++ b/test/psych/test_alias_and_anchor.rb @@ -92,5 +92,18 @@ def test_anchor_alias_round_trip_substring_with_ivars assert_equal('test', el.var1) end end + + def test_anchor_order_is_numerically_ascending + a = [] + b = [a, a] + c = [b, b] + assert_equal(Psych.dump(c), <