mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* Rely on encoding tags to determine if string should be dumped as binary.
    8949a47b8c
  * Specify "frozen_string_literal: true".
  * Support to binary release for mingw32 platform.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
		
	
			
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			604 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			604 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
# frozen_string_literal: true
 | 
						|
require_relative 'helper'
 | 
						|
 | 
						|
module Psych
 | 
						|
  class TestClass < TestCase
 | 
						|
    module Foo
 | 
						|
    end
 | 
						|
 | 
						|
    def test_cycle_anonymous_class
 | 
						|
      assert_raises(::TypeError) do
 | 
						|
        assert_cycle(Class.new)
 | 
						|
      end
 | 
						|
    end
 | 
						|
 | 
						|
    def test_cycle_anonymous_module
 | 
						|
      assert_raises(::TypeError) do
 | 
						|
        assert_cycle(Module.new)
 | 
						|
      end
 | 
						|
    end
 | 
						|
 | 
						|
    def test_cycle
 | 
						|
      assert_cycle(TestClass)
 | 
						|
    end
 | 
						|
 | 
						|
    def test_dump
 | 
						|
      Psych.dump TestClass
 | 
						|
    end
 | 
						|
 | 
						|
    def test_cycle_module
 | 
						|
      assert_cycle(Foo)
 | 
						|
    end
 | 
						|
 | 
						|
    def test_dump_module
 | 
						|
      Psych.dump Foo
 | 
						|
    end
 | 
						|
  end
 | 
						|
end
 |