Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/psych/test_alias_and_anchor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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), <<EOYAML)
---
- &1
- &2 []
- *2
- *1
EOYAML
end
end
end