mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	test_const.rb: suppress warnings
* test/ruby/test_const.rb (test_redefinition_memory_leak): suppress warnings instead of redirecting to null device. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									78baa98e69
								
							
						
					
					
						commit
						eb4dc17956
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -62,11 +62,8 @@ WARNING
 | 
			
		|||
 | 
			
		||||
  def test_redefinition_memory_leak
 | 
			
		||||
    code = <<-PRE
 | 
			
		||||
olderr = $stderr.dup
 | 
			
		||||
$stderr.reopen(File::NULL, "wb")
 | 
			
		||||
350000.times { FOO = :BAR }
 | 
			
		||||
$stderr.reopen(olderr)
 | 
			
		||||
PRE
 | 
			
		||||
    assert_no_memory_leak([], '', code, 'redefined constant', timeout: 30)
 | 
			
		||||
    assert_no_memory_leak(%w[-W0 -], '', code, 'redefined constant', timeout: 30)
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue