Sha256: 671184adb326ff2beb13e58735632cdbe2d605e20accfe583e3f79b8bd60c9d9

Contents?: true

Size: 481 Bytes

Versions: 10

Compression:

Stored size: 481 Bytes

Contents

require 'psych/helper'

module Psych
 class TestAliasAndAnchor < TestCase
   def test_mri_compatibility
     yaml = <<EOYAML
---
- &id001 !ruby/object {}

- *id001
- *id001
EOYAML
     result = Psych.load yaml
     result.each {|el| assert_same(result[0], el) }
   end

   def test_anchor_alias_round_trip
     o = Object.new
     original = [o,o,o]

     yaml = Psych.dump original
     result = Psych.load yaml
     result.each {|el| assert_same(result[0], el) }
   end
 end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
psych-1.3.3 test/psych/test_alias_and_anchor.rb
psych-1.3.2 test/psych/test_alias_and_anchor.rb
psych-1.3.1 test/psych/test_alias_and_anchor.rb
psych-1.3.0 test/psych/test_alias_and_anchor.rb
psych-1.2.2 test/psych/test_alias_and_anchor.rb
psych-1.2.2.rc1 test/psych/test_alias_and_anchor.rb
psych-1.2.1 test/psych/test_alias_and_anchor.rb
psych-1.2.0 test/psych/test_alias_and_anchor.rb
psych-1.1.1 test/psych/test_alias_and_anchor.rb
psych-1.1.0 test/psych/test_alias_and_anchor.rb