mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	disable GC on a test
CI fails with GC while `foo{}`, so that disable GC for this script.
			
			
This commit is contained in:
		
							parent
							
								
									366646c15e
								
							
						
					
					
						commit
						195075e8f5
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -701,11 +701,11 @@ class TestRubyOptimization < Test::Unit::TestCase
 | 
			
		|||
 | 
			
		||||
  def test_block_parameter_should_not_create_objects
 | 
			
		||||
    assert_separately [], <<-END
 | 
			
		||||
      #
 | 
			
		||||
      def foo &b
 | 
			
		||||
      end
 | 
			
		||||
      h1 = {}; h2 = {}
 | 
			
		||||
      ObjectSpace.count_objects(h1) # rehearsal
 | 
			
		||||
      GC.start; GC.disable          # to disable GC while foo{}
 | 
			
		||||
      ObjectSpace.count_objects(h1)
 | 
			
		||||
      foo{}
 | 
			
		||||
      ObjectSpace.count_objects(h2)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue