fix references (again)
quite tricky logic, but now outputting at lowest level, as intended
This commit is contained in:
@ -22,4 +22,14 @@ class TestRefs < MiniTest::Test
|
||||
check "-&1 {}
|
||||
-*1"
|
||||
end
|
||||
def test_bigger
|
||||
@out = [ { :one => @array , :two => [{ :three => @array}] } ]
|
||||
check "--:one => &1 []\n -:two => -{:three => *1}"
|
||||
end
|
||||
def test_object
|
||||
object = ObjectWithAttributes.new
|
||||
object.extra = [object]
|
||||
@out = [ {:one => object} , object ]
|
||||
check "-{:one => *1}\n-&1 ObjectWithAttributes(:name => 'some name', :number => 1234)\n :extra [*1]"
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user