summaryrefslogtreecommitdiff
path: root/test/psych/test_array.rb
blob: ec6a1aa1472aa7a267a3a38a23628e6540567646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'psych/helper'

module Psych
  class TestArray < TestCase
    def setup
      super
      @list = [{ :a => 'b' }, 'foo']
    end

    def test_self_referential
      @list << @list
      assert_cycle(@list)
    end

    def test_cycle
      assert_cycle(@list)
    end
  end
end