fix recursive arrays

This commit is contained in:
Torsten Ruger
2014-08-18 13:22:03 +03:00
parent 99e0c0db18
commit ad4aaaff8a
4 changed files with 16 additions and 7 deletions

View File

@ -75,4 +75,10 @@ class BasicSof < MiniTest::Test
@out = Sof::Writer.write({ one: [1 , ObjectWithAttributes.new] , two: true })
check "-:one: -1\n -#{OBJECT_STRING}\n-:two: true"
end
def test_array_recursive
ar = [true, 1 ]
ar << ar
@out = Sof::Writer.write(ar)
check "-true\n-1\n-*1"
end
end